Re: Path to dynamic libraries
Re: Path to dynamic libraries
- Subject: Re: Path to dynamic libraries
- From: Sherm Pendley <email@hidden>
- Date: Tue, 27 Feb 2007 11:58:11 -0500
On Feb 27, 2007, at 11:31 AM, Johan Morin wrote:
I need a little bit of help on how to specify search paths for
dynamic libraries in an application bundle.
I am using a dynamic library which is loaded with dlopen(). This
works fine when I start the application from the command line and
has added the path of the library to the environment variable
DYLD_LIBRARY_PATH.
If you need to play with environment variables, it's not working fine
- you've just found a workaround for the problem. :-)
What you need to do is specify an install_name for the library that's
relative to the application binary. If you're using libtool, the
option you want to use is:
-install_name @executable_path/lib
If you're using Xcode to build your library, you want to specify the
"Installation Directory" in the "Deployment" pane of the target
properties. (Not to be confused with the "Deployment" build
configuration...)
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden