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++ > > [amcintosh@amcintosh 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++ > [amcintosh@amcintosh 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:[EMAIL PROTECTED]> <http://www.kolpackov.net> 1024D/EBB172C3 - 9879 C89B 4985 4262 216B 4006 867F 3F22 EBB1 72C3 _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool