Re: Path to dynamic libraries
Re: Path to dynamic libraries
- Subject: Re: Path to dynamic libraries
- From: Alexander Dymerets <email@hidden>
- Date: Tue, 27 Feb 2007 21:27:00 +0200
- Organization: The Product Engine (Odessa)
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.
I think, you can just send a full path the library to dlopen.
NSString* path_to_dl = [[[NSBundle mainBundle] bundlePath]
stringByAppendingPathComponent: @"Contents/MacOS/mylib.dylib"];
dlopen([path_to_dl fileSystemRepresentation], RTLD_LAZY);
_______________________________________________
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