Author Topic: Difficulties with generation of static library [fixed]  (Read 2865 times)

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Difficulties with generation of static library [fixed]
« 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
« Last Edit: March 21, 2007, 02:44:52 pm by uenz »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Difficulties with generation of static library
« Reply #1 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).
Be patient!
This bug will be fixed soon...

Offline uenz

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Difficulties with generation of static library [fixed]
« Reply #2 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