libtool
[Top][All Lists]
Advanced

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

Libtool eats redundant link objects


From: Sam TH
Subject: Libtool eats redundant link objects
Date: Tue, 6 Feb 2001 05:31:06 -0600
User-agent: Mutt/1.3.12i

I'm attempting to libtoolize a large package, and am running into a
significant problem.  

For reasons which are known only to itself, gcc refuses to link all
the static archives that make up this package unless they are declared
multiple times on the command line.  So, I want to do something like
this:

$(FOOLIBS) = lib1.la lib2.la

$(LDADD) = $(FOOLIBS) $(FOOLIBS) $(FOOLIBS)

foo:
        $(LIBTOOL) --mode=link $(CXX) -o foo $(LDADD)

Which produces the command 

/bin/sh ../../libtool --mode-link c++ -o foo lib1.la lib2.la lib1.la \
lib2.la lib1.la lib2.la

Which is what I want. However, libtool then issues this command.

c++ -o foo ./libs/lib1.a ./libs/lib2.a

Which then has a bunch of undefined symbols.  Manually issuing the
command 

c++ -o foo ./libs/lib1.a ./libs/lib2.a ./libs/lib1.a ./libs/lib2.a \ 
./libs/lib1.a ./libs/lib2.a 

causes it to compile, but that's obviously not a solution.

What can I do to make libtool keep the duplicates?
           
        sam th               
        address@hidden
        http://www.abisource.com/~sam/
        GnuPG Key:  
        http://www.abisource.com/~sam/key

Attachment: pgpltiT6GRBQW.pgp
Description: PGP signature


reply via email to

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