Code::Blocks Forums

User forums => Help => Topic started by: uenz on March 21, 2007, 08:42:11 am

Title: Difficulties with generation of static library [fixed]
Post by: uenz on March 21, 2007, 08:42:11 am
Hi,

im trying to build a static library (e.g. libA) which depends on another static library (e.g. libB). Its no problem to compile the library libA. I've set libB in the linker settings of the projekt. When i use libA in my application projekt the functions which libB exports are not found by the linker  :?. If i add libB to my application projekt it will work. Which settings must i make to "glue" libB to libA in the library project?
(When generating .exe files the linker settings is the right place to do this, but with static libs it seems not...)

Thanks for reply

uenz

OS: WinXP/Suse10.2
C::B: latest nightly builds
Title: Re: Difficulties with generation of static library
Post by: mandrav on March 21, 2007, 09:21:01 am
Static libs contain only their own symbols, not from any other library. When you create an executable, you must link to both libA and libB. There is no other way (unless you create dynamic libraries - dlls).
Title: Re: Difficulties with generation of static library [fixed]
Post by: uenz on March 21, 2007, 02:44:35 pm
Hi,

thanks for help. Made a dynnamic library porject out of the LibA project. Now it works! :lol:

Thank you very much!

Uenz