News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Static member functions in static libs

Started by BruceGerdes, April 22, 2010, 07:01:53 PM

Previous topic - Next topic

BruceGerdes

I'm trying to link a program with several static (.a) libraries, one of which contains a couple of classes with all static member functions.  For some reason, the linker can't find those static member functions, reporting them as unresolved external references.  But if I convert the libraries to dynamic libraries (.so), the problem vanishes.  Has anybody seen this one?  (running Ubuntu 9.10 a64).

BruceGerdes

Found it.  The libs have to be in the right sequence when they are defined in the link options.  Work's fine now.