Re: How to make a program look for dylibs other than /usr/local/lib?
Re: How to make a program look for dylibs other than /usr/local/lib?
- Subject: Re: How to make a program look for dylibs other than /usr/local/lib?
- From: Peter O'Gorman <email@hidden>
- Date: Thu, 06 Dec 2007 00:08:21 -0600
Graham Reitz wrote:
> I have a C++ project that needs to load a third party dylib. I removed
> the dylib from /usr/local/lib and placed it in a different directory. I
> updated the linker paths to reflect this change . When I run the
> program it is still looking for the dylib in /usr/local/lib.
>
> How do you tell it to look for the dylib in a different directory?
>
> It still looks in /usr/local/lib even if I place the dylib in the same
> directory as the binary.
Look at the manpage for install_name_tool, also google for docs for
@executable_path, @loader_path and @rpath.
Even though you have moved the binary, its install_name remains as
/usr/local/lib/libfoo.dylib.
Peter
--
Peter O'Gorman
http://pogma.com
_______________________________________________
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