Re: static library and undefined reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Iker,

The order of the libraries on the command line is significant.

If library libfoo.a has an undefined symbol, and that symbol is in libbar.a, you need to put libfoo.a before libbar.a on the command line.

If you have a situation where libfoo.a is dependent on libbar.a, and libbar.a is dependent on libfoo.a, you'll need to specify them twice: libfoo.a libbar.a libfoo.a. Generally, it's recommended that you don't have interdependencies like that.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux