I am developing a Cocoa Application using the latest version of Xcode 4, I want to link dynamic libraries to my project (dylibs
).
I read somewhere that adding the libraries in my project was not enough as I have to run install_name_tool
and otool
to make my project use the libraries that were bundled in my project.
I have read the manual pages for install_name_tool
, but I do not understand WHY I have to do this.
How do libraries work? Especially interested in the part where the application and the libraries have paths that point to specific places in my machine, like /usr/local/lib/mylibrary.dylib
when running otool -L
otool -L
is also helpful to display the names and shared libraries (that you might want to change withinstall_name_tool
. – Were