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