Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
- Subject: Lion 10.7 SDK backwards compatibility problem with linking to libreadline.dylib for Snow Leopard
- From: Eric Wing <email@hidden>
- Date: Mon, 19 Sep 2011 16:13:49 -0700
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.)
Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
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