Author Topic: Static member functions in static libs  (Read 3569 times)

Offline BruceGerdes

  • Single posting newcomer
  • *
  • Posts: 4
Static member functions in static libs
« on: April 22, 2010, 07:01:53 pm »
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).

Offline BruceGerdes

  • Single posting newcomer
  • *
  • Posts: 4
Re: Static member functions in static libs
« Reply #1 on: April 23, 2010, 12:11:13 am »
Found it.  The libs have to be in the right sequence when they are defined in the link options.  Work's fine now.