Re: Forcing Xcode to prefer a specific dylib
Re: Forcing Xcode to prefer a specific dylib
- Subject: Re: Forcing Xcode to prefer a specific dylib
- From: Chris Hanson <email@hidden>
- Date: Thu, 17 Apr 2008 12:51:43 -0700
On Apr 17, 2008, at 4:25 AM, Brad Peterson wrote:
On 10.5, Xcode seems to prefer libcurl.4.dylib, even
though other earlier versions are available. Of
course, on 10.4, only libcurl.3.dylib is available.
That's not quite what's going on.
Each dynamic library has an "install name" embedded within it at the
time it's built; this install name is typically the full path to the
library on disk. When you link against a dynamic library, the install
name of that library is copied into your executable.
So you're telling Xcode to link against libcurl.dylib. The install
name embedded within libcurl.dylib in the Mac OS X 10.5 SDK included
with Xcode 3.0 is libcurl.4.dylib -- you can see this by doing
% otool -D /Xcode3.0/SDKs/MacOSX10.5.sdk/usr/lib/libcurl.dylib
/Xcode3.0/SDKs/MacOSX10.5.sdk/usr/lib/libcurl.dylib:
/usr/lib/libcurl.4.dylib
at the command line. (Substituting wherever you have Xcode 3.0
installed, of course.) However, in the 10.4 (Universal) SDK,
libcurl.dylib's install name is libcurl.3.dylib:
% otool -D /Xcode3.0/SDKs/MacOSX10.4u.sdk/usr/lib/libcurl.dylib
/Xcode3.0/SDKs/MacOSX10.4u.sdk/usr/lib/libcurl.dylib:
/usr/lib/libcurl.3.dylib
Right now, your only options are to build against the 10.4 (Universal)
SDK, or to use install_name_tool to change the install-name for
libcurl in your executable *after* it has been linked.
Please file a bug against the Mac OS X 10.5 SDK for this; you should
be able to build against the 10.5 SDK and deploy against 10.4, and
anything which prevents that is a bug.
-- 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