Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: wanggeng on November 29, 2011, 05:23:54 pm
-
I am going to build a static library(libC6Lib.a), and this library has to be linked with a previous build library(test_head.lib).
I add the library file into [project options]->[linker settings]->[link libraries] and add library's path into [project options]->[search directories]->[linker].
I open the option "save build log to HTML file when build is finished".
However, I only get the following link command:
c6runlib_codeblock_ar -r -s libC6Lib.a obj/Debug/main.o
the test_head.lib is not in command line, and I can not remove the "-r" either "-s" option.
who can help me. Thank You!
-
Static libraries do not link to other libraries - they are just archives of object files.
-
Well, Thank you. But my compiler is special, it need an library file to generate its library. How can I the set up the Code::Blocks IDE to generate command line like this:
c6runlib_codeblock_ar -r -s libC6Lib.a obj/Debug/main.o test_head.lib
-
You can edit the compiler/linker commands in Settings->Compiler -> Your compiler -> Other settings -> Advanced