Re: Xcode2.5 prepending SDKROOT to framework link path
Re: Xcode2.5 prepending SDKROOT to framework link path
- Subject: Re: Xcode2.5 prepending SDKROOT to framework link path
- From: Chris Espinosa <email@hidden>
- Date: Thu, 19 Mar 2009 14:35:24 -0700
On Mar 19, 2009, at 2:12 PM, Patrick Stinson wrote:
Xcode seems to be magically and quietly prepending the SDKROOT and
install location of one of my project's dylibs to the linker path for
a framework that the dylib uses. The (QtGui) framework is naturally
not found, and so undefined symbols result. The resulting invalid path
looks like this:
/Developer/SDKs/MacOSX10.4u.sdk/Library/Application Support/East
West/Frameworks/QtCore.framework/Versions/4/QtCore
and it should be this:
/usr/local/Trolltech/Qt-4.3.0/lib/QtCore.framework/Versions/4/QtCore
Yes, if you use an SDK, Xcode 2.5 will assume that all the content in
system paths has to come from the SDK, and prepends the SDKROOT to
it. Later versions of the 10.4u SDK add a symlink from the SDK to /
usr/lib to work around this behavior, and newer versions treat such
references specially without the need for the symlink.
I checked with otool and none of the install names for the binaries in
question include the SDKROOT.
My target exe is called "Play", my dylib is called "playgui" and the
framework used by both is QtCore.framework. The playgui dylib is built
in the install location of "/Library/Application Support/East West/",
and install_name_tool is run to get it to point to a copy of the Qt
frameworks in our app data directory of "/Library/Application
Support/East West/Frameworks".
For some reason, when linking the "Play" app target to the "playgui"
dylib, it prepends the SDKROOT *and* the path for QtCore.framework set
by install_name_tool on "playgui" dylib, and so can't find the
frameworks. The invalid path that it dreams up looks like this:
Your alternatives are:
- copy the framework into the SDK
- add a symlink from /Developer/SDKs/MacOSX10.4u.sdk/usr/local to /usr/
local
- remove the framework from the project and provide an explicit
setting in the Other Linker Flags to link directly to the framework,
e.g. -framework /usr/local/Trolltech/Qt-4.3.0/lib/QtCore.framework
Is there some setting that tellsXcode to prepend the SDKROOT to the
linker path? I'm on an intel machine runningXcode2.5 on Tiger.
There have been a lot of bug fixes to Xcode in 3.0, 3.1, 3.1.1, 3.1.2
and the new 3.1.3 Beta which you should avail yourself off, and also
in the system frameworks for Leopard. Xcode 2.5 is functionally
equivalent to Xcode 2.4.1, which originally shipped in November, 2006.
If you're using a two-and-a-half-year-old IDE, you're going to be
spending a lot of time struggling with issues that other people left
behind years ago. Xcode upgrades are free; Leopard is inexpensive,
and RAM is reasonable.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden