libtool
[Top][All Lists]
Advanced

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

Re: Building projects on i386-pc-solaris2.8


From: Boris Kolpackov
Subject: Re: Building projects on i386-pc-solaris2.8
Date: Fri, 1 Feb 2002 23:40:07 +0300

Hi Allan,

> On the solaris machine there are 3 linkers:
>
> /opt/sfw/bin/ld
> /usr/ucb/ld
> /usr/ccs/bin/ld
>
> If I do a `which ld` it returns /opt/sfw/bin/ld
> /opt/sfw/bin/c++
>
> address@hidden 11:57:49 src]# ls -la /opt/sfw/bin/c++
> -r-xr-xr-x   2 root     bin        74868 May 21  2001 /opt/sfw/bin/c++
> address@hidden 11:58:06 src]# /opt/sfw/bin/c++ -v
> Reading specs from /opt/sfw/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
>
>
> Then if I simply compile from the command line:
>
> c++  -o libagent.so -fPIC -L/usr/local/lib -G Agent.o AgentObject.o
> AgentObjectLinux.o AgentObjectFactory.o Vector.o  Attribute.o
> SharedLibrary.o SharedLibraryMgr.o Storage.o StorageFile.o
> AttributeContainer.o ObjectContainer.o AgentObjectVersion.o ODParser.o
> XMLParser.o XMLItem.o md5.o -lcrypt -ldl -lltapi12 -lltstd12 -lz
>
> The library builds fine.  But if I  use libtool to build it. I get
> many undefined symbols.
>
> The libtool script has:
>
> LD="/usr/ccs/bin/ld"
>

I tried the same thing some time ago (about 2-3 months). Here are my two
cents.

(1) g++ links some objects implicitly. try to run g++ -v .... to see them.
This means that if you just change g++ to ld it won't work.

(2) the order in which this implicit files get linked IS important. That was
one reason why libtool couldn't handle c++ properly (static object
initializing...). BTW, I would love to know if it works with current
version. It seems that you are using c++. Did you try it?

HTH,
-boris

--
Boris Kolpackov <mailto:address@hidden> <http://www.kolpackov.net>
1024D/EBB172C3 - 9879 C89B 4985 4262 216B  4006 867F 3F22 EBB1 72C3





reply via email to

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