site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=+UiH6sUA22PMZ8IfgTHVCA+I22RFGJGT0IEUOKxlun0=; b=OeLXcdKIQ5VbfbCKxrOv7LOzrLWuz444cdFol+SIJmz0amwH/wd1VDsQJzdK8ORiPd rTX8xAKTmiThgee6wHmODtA0eLTyQpojaMCWyZDyfr8Rebl0ProsAsgHM0Z+eK1WHRpH bKQUa9wvH64DC3Pko/QzlA9WePg0aBI1sNt7c= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=oTRUp/byAUwG8Kxn7GBaR2t4hHgBJ0KBFb96RE7dY2znDFNJ+2mOFQfkhvTWnHdvFZ HSeo3tS9rujdw15ZounFVuuLU/WQgv7Ctyos7Wi7MFUmyxLimhRn+iZyjFQYtNI0yfTb W2Kkd+Ee6VLBTreHAXLsBkBoG383tQQoXOTho= Looks like you did not specified the library search path to the libjost.a library. Try to add -L to your link flags On May 9, 2010, at 11:00 PM, Andy Wiese wrote:
I have a small c++ project that builds & uses a static library, which I would like to build with make in 10.4, 10.5, and 10.6.
In 10.5 and 10.6, it builds just fine, but in 10.4 the linking stage doesn't seem to find any of the symbols in the shared library.
The same code builds in Xcode, and I've tried to study Xcode's build output to see what it is doing differently. I believe I am passing the same options to g++ and libtool as Xcode.
Following is the failed make output from this small project. A library file libjost.a is created, and nm and otool seem to show the symbols that ld complains about.
My next step if I can't figure this out will be to create an even small test project, but I am hoping that someone will spot my error and I can avoid that chore.
make -C src/jost /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Array.o Array.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Exceptions.o Exceptions.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o IntegralType.o IntegralType.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Object.o Object.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Parser.o Parser.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Util.o Util.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -x c++ -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I.. -c -o Value.o Value.cpp /Developer/usr/bin/libtool -static -arch_only i386 -syslibroot /Developer/SDKs/MacOSX10.4u.sdk Array.o Exceptions.o IntegralType.o Object.o Parser.o Util.o Value.o -o libjost.a install -m 0755 libjost.a ../../lib/libjost.a make -C demo/jsonv /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -x c++ -g -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I../../src/ -I../../../boost_trunk -c -o jsonv.o jsonv.cpp /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -g -Wall -DBOOST_DATE_TIME_NO_LIB -I../../../boost_trunk -I../../src/ -L../../lib -ljost -I../../../boost_trunk jsonv.o -o jsonv /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: jost::Parser::parse(std::basic_istream<char, std::char_traits<char> >&) jost::Parser::instance() typeinfo for jost::MalformedJSONStream collect2: ld returned 1 exit status make[1]: *** [all] Error 1 make: *** [all] Error 2
Any suggestions will be greatly appreciated!
Andy _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/rmuginov%40gmail.com
This email sent to rmuginov@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com