FROM : Peter O'Gorman
DATE : Thu Dec 06 07:08:21 2007
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
DATE : Thu Dec 06 07:08:21 2007
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






Xcode mail archive

