Re: Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
Re: Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
- Subject: Re: Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
- From: Chris Suter <email@hidden>
- Date: Wed, 21 Sep 2011 12:54:41 +1000
Hi Eric,
On Wed, Sep 21, 2011 at 12:07 PM, Eric Wing <email@hidden> wrote:
> I think I need to correct myself. This solution isn't working for me.
> It continues to resolve the full path to libedit.3.dylib. I think the
> problem was that I may have forgot to remove my install_name_tool
> trick when I first tried this.
It doesn't work because the path you specify on the command line has
nothing to do with the path that the runtime will use to find your
library. That path comes from within the library (LC_ID_DYLIB I
believe).
You need to link to libedit.dylib in the 10.6 SDK. Just add it
directly into your link phase and it will work fine (so long as you're
running Xcode 4.1). This is exactly what I did with my libcrypto
problem except that I had to copy it into my project because it was
from the 10.5 SDK (which isn't available in Xcode 4).
To fix this issue, I think Apple just need to keep the old dylibs
around within the 10.7 SDK, rather than mirror what the system has
installed.
By the way, I don't think you should ever need to add a library using
-l. It's better to add it in the link phase directly and they've
improved it recently so that it doesn't use -l and a search path any
more; it will use an absolute path for libraries that aren't in the
usual locations.
Kind regards,
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