Hi, I discovered that the problem was actually with some global undefined symbols. The package is an old SCO program that I try to port to Linux. The original authors used a lot of extern variables. When I was linking statically, there was no problem, but now, with libtool and shared libs, I get an error for every undefined extern variable from lib1, lib2 and lib3, even if these vars are not used in the functions I call in prog1 or prog2.
So why is the ld complaining and how do I solve this ? In the present I declare locally all the undeclared vars, but this doesn't look too elegant to me. TIA, Ionutz Ionutz Borcoman wrote: > Hi, > > I have a package organized like this: > > top > |_ lib1 > |_ lib2 > |_ lib3 > |_ prog1 > |_ prog2 > > lib2 uses on lib1 and prog1 uses lib2. > > How do I correctly build the lib2 and prog1 ? > > I have try this (but it doesn't work as I have expected): > > 1) In lib2/Makefile.am > > lib2_la_LIBADD = $(top_builddir)/lib1/lib1.la > > 2) In prog1/Makefile.am > > prog1_LDADD = $(top_builddir)/lib2/lib2.la > > Do I have to explicitly link with lib1.la, too ?
