-
Notifications
You must be signed in to change notification settings - Fork 218
install_name_tool
Daniel Shiffman edited this page Jul 6, 2015
·
5 revisions
Starting with:
$ oTool -L libfreenect.dylib
This lists all the other native files and where they are being looked up.
libfreenect.dylib:
/usr/local/lib/libfreenect.0.5.dylib (compatibility version 0.5.0, current version 0.5.0)
/usr/local/lib/libusb-1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
So now I want to look up libusb-1.0.0.dylib
in the same directory as libfreenect.dylib
. install_name_tool
will take care of this. @loader_path
refers to the path where the path where the first native library was loaded.
$ install_name_tool -change /usr/local/lib/libusb-1.0.0.dylib @loaderpath/libusb-1.0.0.dylib libfreenect.dylib
Now it's
libfreenect.dylib:
/usr/local/lib/libfreenect.0.5.dylib (compatibility version 0.5.0, current version 0.5.0)
@loader_path/libusb-1.0.0.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
So far nothing is complaining about libfreenect.0.5.dylib
or /usr/lib/libSystem.B.dylib
so not changing those until I hear of any bugs?
Some links: