autoconf
[Top][All Lists]
Advanced

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

Undefined symbols( was: how to make multiple libs ?)


From: Ionutz Borcoman
Subject: Undefined symbols( was: how to make multiple libs ?)
Date: Tue, 25 Jun 2002 10:38:41 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020214

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 ?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]