[Solved] Re: Linking w/SDKs from the command line
[Solved] Re: Linking w/SDKs from the command line
- Subject: [Solved] Re: Linking w/SDKs from the command line
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 14 Nov 2003 15:25:15 -0800
On Nov 12, 2003, at 7:38 AM, Alastair Houghton wrote:
If it uses autoconf, check the config.h (or whatever name the package
in question gives it) to see if it has options to disable its use of
poll() and stpcpy().
Thanks. I figured out the problem... I was trying to link the program
against a static library which had been built against 10.3's headers
and libraries, and that was the source of the "undefined symbols"
error. Rebuilding that library against the 10.2 SDK fixed the problem.
Lessons learned:
1. Don't forget about the libraries!
2. Also don't forget to set the CPPFLAGS environmental variable;
apparently Autoconf does use it when determining availability of
headers along with CFLAGS.
So here are the environmental variables necessary to build a file from
the command line using Autoconf, and use an SDK (in tcsh format):
setenv MACOSX_DEPLOYMENT_TARGET "10.2"
setenv NEXT_ROOT "/Developer/SDKs/MacOSX10.2.7.sdk"
setenv CFLAGS "-I/Developer/SDKs/MacOSX10.2.7.sdk/usr/include -nostdinc"
setenv CPPFLAGS "-I/Developer/SDKs/MacOSX10.2.7.sdk/usr/include
-nostdinc"
setenv LDFLAGS "-L/Developer/SDKs/MacOSX10.2.7.sdk/usr/lib"
Add any other flags you want to add to the above (like optimization
flags, etc.), then run the configure script...
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://seiryu.home.comcast.net/
S/MIME signature available upon request
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone." - Bjarne Stroustrup
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.