User forums > Using Code::Blocks
.def & import library names
MortenMacFly:
--- Quote from: thedmd on February 14, 2010, 12:01:00 pm ---If the user wish he/she can replace $(TargetFileName) with $(TargetName) and we got old behavior.
--- End quote ---
Look: It is not as simple as this.
If a user selects "App.Plugin" as a library name you don't know if (s)he wants to have a "Ap.Plugin.dll" or really just "App.Plugin". So querying any extension (by using GetExt()) will not work reliable as for a file like "App.Plugin" it will return "Plugin" as extension which is most likely not intended. Ceniza once posted a solution with another checkbox option that would really enable to setup exactly how the file name should look like and TDragon once posted how GCC "expects" the library extensions. However, I don't find these posts anymore, so I asked Ceniza to have a look at his history here:
--- Quote from: MortenMacFly on October 27, 2009, 09:26:25 am ---Ceniza once proposed a good UI way how to handle this. TDragon proposed how to "tell" the MinGW/GCC compiler what to do. We can continue the discussion once we re-collected this information.
--- End quote ---
...but he didn't answer yet. :-(
From my point of view that was the only acceptable solution so far as it allows for any file naming scheme.
thedmd:
Yep, it is not simple also it is not that hard. I think C::B should allow to choose what user want to got.
Why Set/GetExt are used at the first place for generating target filenames, if CompilerTargetBase is able to provide sufficient information? I found that the name of import library and definition file are computed from target name by using SetExt(). Did I miss something important?
johne53:
--- Quote from: MortenMacFly on February 14, 2010, 05:40:01 pm ---Look: It is not as simple as this.
If a user selects "App.Plugin" as a library name you don't know if (s)he wants to have a "Ap.Plugin.dll" or really just "App.Plugin".
--- End quote ---
But there's a check box that allows the user to determine whether or not the extension should be auto-generated. If (s)he checks the box and types "App.Plugin" then (s)he'll get "App.Plugin.dll". If (s)he doesn't check the box there should be an assumption that the typed extension (if there is one) is the intended extension. And if there isn't a typed-in extension, then it does whatever it does now. Really Morten I think you're finding complications where there aren't any.
MortenMacFly:
--- Quote from: johne53 on February 14, 2010, 06:37:25 pm ---Really Morten I think you're finding complications where there aren't any.
--- End quote ---
Sorry, but I insist that this needs to be implemented correctly. Again: the only correct way I see is the one proposed by Ceniza... wherever that was. But I recall that I made my mind with that suggestion.
johne53:
When/where did Ceniza propose something? There's no proposal in this thread AFAICT.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version