User forums > Using Code::Blocks
.def & import library names
johne53:
No, I meant this suggestion....
--- Quote from: johne53 on February 14, 2010, 06:37:25 pm ---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.
--- End quote ---
If the user types in "foo.dll" amd also checks the box, no further extension would be added (to the dll) because the functionality should be intelligent enough to realise that the extension is already the one that would have been auto-generated. This is the same scenario as if the user had only typed in "foo" (I think... it's quite some time since I looked at what happens if no extension is given but the box is also left unchecked. I might be wrong about that). However, whether I'm right or wrong about the dll naming, any associated files would be called "foo.lib", "foo.def", foo.a" or whatever is appropriate.
However, if the user types in "foo.plugin" and selects auto-generation for the extension, the resulting libraries will be "foo.plugin.dll", "foo.plugin.lib", "foo.plugin.def", "foo.plugin.a" or whatever.
Final scenario - if the user types in "foo.plugin" but doesn't select auto-generation (for the extension) the resulting libraries will be "foo.plugin", "foo.lib", "foo.def", "foo.a" etc.
Hope that makes sense.
thedmd:
Every suggestion I had encountered there stands for "what if user want...". My idea is quite simple, instead of army of checkboxes let the user type in name prototype.
Output filename:foobarImport library filename:$(TargetName)Definition file filename:$(TargetName)[X]Auto-generate filename prefix[X]Auto-generate filename extension
Output filename Auto-prefix Auto-ext GCC
DLLGCC
LIBGCC
DEFVC++
DLLVC++
LIBVC++
DEF foobar X X foobar.dll libfoobar.a libfoobar.def foobar.dll foobar.lib foobar.def foobar.dll X X foobar.dll libfoobar.a libfoobar.def foobar.dll foobar.lib foobar.def foo.bar X X foo.bar.dll libfoo.bar.a libfoo.bar.def foo.bar.dll foo.bar.lib foo.bar.def foo.bar.dll X X foo.bar.dll libfoo.bar.a libfoo.bar.def foo.bar.dll foo.bar.lib foo.bar.def foobar X foobar.dll foobar.a foobar.def foobar.dll foobar.lib foobar.def foobar.dll X foobar.dll foobar.a foobar.def foobar.dll foobar.lib foobar.def foo.bar X foo.bar.dll foo.bar.a foo.bar.def foo.bar.dll foo.bar.lib foo.bar.def foo.bar.dll X foo.bar.dll foo.bar.a foo.bar.def foo.bar.dll foo.bar.lib foo.bar.def foobar X foobar libfoobar libfoobar foobar foobar foobar foobar.dll X foobar.dll libfoobar libfoobar foobar.dll foobar foobar foo.bar X foo.bar libfoo.bar libfoo.bar foo.bar foo.bar foo.bar foo.bar.dll X foo.bar.dll libfoo.bar libfoo.bar foo.bar.dll foo.bar foo.bar foobar foobar foobar foobar foobar foobar foobar foobar.dll foobar.dll foobar foobar foobar.dll foobar foobar foo.bar foo.bar foo.bar foo.bar foo.bar foo.bar foo.bar foo.bar.dll foo.bar.dll foo.bar foo.bar foo.bar.dll foo.bar foo.bar
Replace import library filename with $(TargetFileName) and we got:
Target nameTarget file name Auto-prefix Auto-ext GCC
LIBVC++
LIB foobar foobar.dll X X libfoobar.dll.a foobar.dll.lib foobar.dll foobar.dll X X libfoobar.dll.a foobar.dll.lib foo.bar foo.bar.dll X X libfoo.bar.dll.a foo.bar.dll.lib foo.bar.dll foo.bar.dll X X libfoo.bar.dll.a foo.bar.dll.lib foobar foobar.dll X foobar.dll.a foobar.dll.lib foobar.dll foobar.dll X foobar.dll.a foobar.dll.lib foo.bar foo.bar.dll X foo.bar.dll.a foo.bar.dll.lib foo.bar.dll foo.bar.dll X foo.bar.dll.a foo.bar.dll.lib foobar foobar X libfoobar foobar foobar.dll foobar.dll X libfoobar.dll foobar.dll foo.bar foo.bar X libfoo.bar foo.bar foo.bar.dll foo.bar.dll X libfoo.bar.dll foo.bar.dll foobar foobar foobar foobar foobar.dll foobar.dll foobar.dll foobar.dll foo.bar foo.bar foo.bar foo.bar foo.bar.dll foo.bar.dll foo.bar.dll foo.bar.dll
$(TargetName) - file name without extension (default extension is always stripped, .dll for examle)
$(TargetFileName) - file name with extension (if auto-ext is checked and ext is different from default one, ext is appended)
Is it sufficient?
MortenMacFly:
--- Quote from: thedmd on February 15, 2010, 10:35:58 am ---Is it sufficient?
--- End quote ---
I guess so... :lol:
thedmd:
Do you agree to implement this solution in C::B? It is rather simple. I'm not sure where those changes have to be introduced, becouse I allready found a few places where the target name is computed.
thedmd:
BUMP
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version