Re: App linked on Leopard crashes on Tiger (curl.dylib)
Re: App linked on Leopard crashes on Tiger (curl.dylib)
- Subject: Re: App linked on Leopard crashes on Tiger (curl.dylib)
- From: "William H. Schultz" <email@hidden>
- Date: Wed, 31 Oct 2007 17:08:21 -0700
I haven't run into your specific issue, so I can't say for certain
whether or not this will work. Try running a script after your app
has been built that uses "install_name_tool" to change the internal
path from /usr/lib/libcurl.4.dylib to /usr/lib/libcurl.3.dylib. Also,
try using "-weak-lcurl" in your linker flags. Your program will still
launch if presented with an older library file, but you'll need to
make sure function pointers aren't NULL before calling them.
See this page for more info on weak linking: http://developer.apple.com/technotes/tn2002/tn2064.html
-------------------------------
Hank Schultz
Cedrus Corporation
http://www.cedrus.com/
On Oct 31, 2007, at 4:56 PM, Stephen F. Booth wrote:
I've run into a problem updating one of my apps for Leopard. I'm
able to compile and run on Leopard, but when run on Tiger the app is
crashing:
Host Name: XXX
Date/Time: 2007-10-31 16:04:40.871 -0700
OS Version: 10.4.10 (Build 8R2232)
Report Version: 4
Command: Play
Path: /Volumes/BOOTH/Play.app/Contents/MacOS/Play
Parent: WindowServer [56]
Version: 0.2 (1050)
PID: 791
Thread: Unknown
Link (dyld) error:
Library not loaded: /usr/lib/libcurl.4.dylib
Referenced from: /Volumes/BOOTH/Play.app/Contents/MacOS/Play
Reason: image not found
Obviously the problem is that on Leopard curl has been updated,
while on Tiger the latest curl available is libcurl.3. After
reading the cross-development programming guide I've set the SDK to
10.5 and the deployment target to 10.4, as I want to have Leopard
features available but the app should run on Tiger. Other than
adding -lcurl to the other linker flags everything is fairly standard.
I've tried changing the linker flags to -lcurl.3 in an attempt to
force it to link against the older version, but that doesn't help
since all the dylibs are symlinks to the same file. The linker
appears to embed the full path to the image in the executable. I
was under the impression that setting the deployment target to 10.4
would take care of issues like this.
I need to have the SDK set to 10.5 because I used some API in Tiger
that no longer work in Leopard, and I need new Leopard API to work
around my previous Tiger hackery. Is there something I can do to
get this working? Surely I don't have to resort to dlopen()!
Thanks,
Stephen
_______________________________________________
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
_______________________________________________
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