月份:二月 2010

mac 10.6 built shared library can’t be linked on 10.5

Posted on Updated on

Add ‘-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5’ after compiler.

example:example: ./configure CFLAGS="-std=gnu99 -arch i386 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include -I/Developer/usr/lib/gcc/i686-apple-darwin10/4.0.1/install-tools/include -isysroot /Developer/SDKs/MacOSX10.4.sdk -mmacosx-version-min=10.4" CC="gcc-4.0" LDFLAGS="-std=gnu99 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4.sdk -mmacosx-version-min=10.4"
reference: http://discussions.apple.com/thread.jspa?threadID=2151112&tstart=-1