Linking w/SDKs from the command line
Linking w/SDKs from the command line
- Subject: Linking w/SDKs from the command line
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 11 Nov 2003 19:08:27 -0800
I'm trying to compile some command-line project whose makefiles are
generated by an autoconf script against an SDK, rather than the current
libraries. But I'm running into some trouble here; I can't get the
compiler (the compiler is called to do the linking) to ignore /usr/lib,
which results in the code not getting linked due to symbol differences.
I've set the CFLAGS and LDFLAGS environments like this:
setenv CFLAGS "-I/Developer/SDKs/MacOSX10.2.7.sdk/usr/include -O2
-mdynamic-no-pic -nostdinc"
setenv LDFLAGS "-L/Developer/SDKs/MacOSX10.2.7.sdk/usr/lib"
The "-nostdinc" line makes GCC ignore /usr/include, which is what I
want it to do. But I also need the linker to ignore /usr/lib and use
only the paths passed to it via -L, but I don't see an option to do
this.
I already tried the "-nostdlib" option, but that disables linking to
libgcc and libSystem, which is not necessarily what I want to do.
It says in the manual that the linker will "include several standard
system directories plus any that you specify with -L." But how do I
turn off the inclusion of those system directories? I can't see this
anywhere in the documentation. Does anyone know?
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.