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: Tue, 20 Sep 2011 09:19:52 +1000
Hi Eric,
On Tue, Sep 20, 2011 at 9:13 AM, Eric Wing <email@hidden> wrote:
> I am trying to build a Lion app that is still backwards compatible
> with Snow Leopard. I am building against the 10.7 SDK and checking for
> existence of the Lion-only features I am using. I make sure to set my
> Deployment target to 10.6.
>
> My problem is with libreadline.dylib. My application depends on it so
> I link to it. libreadline.dylib is available on both Snow Leopard and
> Lion in /usr/lib.
>
> It seems that when I link against libreadline.dylib, it is actually
> linking to libedit.3.dylib on Lion because it is actually symlinked
> that way. The problem is that Snow Leopard only has libedit.2.dylib,
> not libedit.3.dylib. So when I run on Snow Leopard, the program
> immediately crashes because it can't find libedit.3.dylib. If I try to
> explicitly link against libedit.2.dylib or just libedit.dylib on my
> Lion machine with the 10.7 SDK, it always resolves to libedit.3.dylib.
>
>
> Is there an easy, well-supported way to solve this problem? (Right
> now, I can get around the problem by re-writing the link path using
> install_name_tool, but I know it will probably be asking for trouble
> doing that type of thing.)
I had a similar issue with libcrypto. I solved it by copying the
required libcrypto into my project and then linking against that
rather than the one in the SDK. Not nice, but that was the best option
for me.
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