Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: pac on February 03, 2007, 10:19:24 pm
-
When building a library and assignint to it the .lib extension
despite the builder log which says :
Linking static library: bin\Release\libmrf.lib
Process terminated with status 0 (0 minutes, 48 seconds)
0 errors, 0 warnings
the linker still produces the library with the .a extension.
Conseuauence : there is not libmrf.lib created but a libmrf.a is produced
is it a bug or am I missing something ?
Best regards
-
What compiler are you using?
.a is a minGW GCC library
.lib is a MS VC Library
Code::Blocks is a IDE it does NOT give extra abilities to the compiler.
Tim S
-
I am using Mingw tools
This is not about giving extra capabilities to the linker/compiler.
This is about giving it the argument specified in the text field Widget of the configuration dialog box.
THe Gnu Ld compler let you specify the file extension of a dynamic library.
Example (which works perfectly with the command line):
g++ -o build/accelerators/libmrfaccelerators.lib -shared build/accelerators/Voxel.os build/accelerators/AccGrid.os build/accelerators/IVBase.os build/accelerators/IVVertexGrid.os
For static library you have the same feature because the ar utility let you specify the extension too.
Best Regards
-
You do realize that just changing the extension to .lib does NOT make the output an MSVC compatible .lib.
If you wish to do this with code::blocks did you turn off.
"Auto Generate filename extension" and you most likely want to turnoff "Auto generate filename prefix"
Look for the above under "Project" -> "Properties" Tab "targets"
Tim S
-
arf...
Of course I realize that and of course I tried to turnoff the options you're talking about
It does not produce the appropriate result (at least with the nightly build of the 24th January)
I think its a bug...
Pac
-
Turn on compile logging and see what the commands C::B is producing.
Tim S
From Pecan answer to other thread
//-- Full Compile Logging --
Main Menu->Settings->Compiler and Debugger->"Other"->Compiler logging = "Full command line".
-
With this settings set
this shows that the wrong file extension
is passed to the command ar
and thus producing the wrong library
Pac
-
With this settings set
this shows that the wrong file extension
is passed to the command ar
and thus producing the wrong library
Pac
After, making sure you changed the name in the project properties.
I would then suggest making a small test case of project file and source and header and attaching it to this thread and also submitting a bug report on it. Note, the fact if the problem happens on static or dynamic or both types of libraries.
Tim S
-
where is the appropriate place to report a bug ?
-
From http://www.codeblocks.org/
http://developer.berlios.de/projects/codeblocks/
http://developer.berlios.de/bugs/?func=addbug&group_id=5358
Note: If Berlios still has the DDoS issue you may need to change http:// to https://
You can also read this thread about reporting bugs
http://forums.codeblocks.org/index.php?topic=5100.msg39848#msg39848
Tim S