• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dylib versions and symlinks redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dylib versions and symlinks redux


  • Subject: Re: dylib versions and symlinks redux
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 15 Feb 2008 17:00:39 -0800


On Feb 15, 2008, at 4:50 PM, Dave Camp wrote:

I'm using Xcode 3 on 10.5.2 and I've got an app that I need to link with libcurl. My SDK is set to 10.5 (I use some 10.5 features if they are present) and my deployment target is set to 10.4.

I'm hitting the problem where the linker picks up the dylib the symlink points to instead of using whatever the most recent is at runtime. Reading the list it looked like the correct solution was to remove libcurl.dylib from my project and instead add -lcurl to the linker flags, however, that doesn't seem to work. My code still won't load on 10.4 and otool -L on 10.4 shows the binary wanting / usr/lib/libcurl.4.dylib instead of /usr/lib/libcurl.dylib

The build log shows the following for the link stage:
Ld /Users/dave/dev/svn/foo/trunk/PreferencePane/../build/Debug/ foo.prefPane/Contents/MacOS/foo normal i386
mkdir /Users/dave/dev/svn/foo/trunk/PreferencePane/../build/Debug/ foo.prefPane/Contents/MacOS
cd /Users/dave/dev/svn/foo/trunk/PreferencePane
/Developer/usr/bin/gcc-4.0 -o /Users/dave/dev/svn/foo/trunk/ PreferencePane/../build/Debug/foo.prefPane/Contents/MacOS/foo -L/ Users/dave/dev/svn/foo/trunk/PreferencePane/../build/Debug -F/Users/ dave/dev/svn/foo/trunk/PreferencePane/../build/Debug -filelist / Users/dave/dev/svn/foo/trunk/PreferencePane/../build/ PreferencePane.build/Debug/PreferencePane.build/Objects-normal/i386/ foo.LinkFileList -framework Cocoa -framework PreferencePanes - framework Security -framework SecurityInterface -framework WebKit - lz -arch i386 -bundle -mmacosx-version-min=10.4 -lcurl -isysroot / Developer/SDKs/MacOSX10.5.sdk



What am I doing wrong?

Removing curl from your Link Libraries and Frameworks build phase and replacing it with -lcurl was a no-op; it does exactly the same thing. I think what you want is -l/usr/lib/libcurl.3.dylib to explicitly link to the earlier version of curl.


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


References: 
 >dylib versions and symlinks redux (From: Dave Camp <email@hidden>)

  • Prev by Date: dylib versions and symlinks redux
  • Next by Date: Re: A little confused about target settings
  • Previous by thread: dylib versions and symlinks redux
  • Next by thread: Env variables dropped in 3.0
  • Index(es):
    • Date
    • Thread