How To Determine Dynamic Library Dependencies For An Executable or Library File in OS X

Posted on 1 CommentPosted in Apple

This script uses otool -L to determine and print all dynamic library dependencies of a given executable or library file recursively and you use it like this: $ /bin/ls /bin/ls: /usr/lib/libgcc_s.1.dylib /usr/lib/libncurses.5.4.dylib /usr/lib/libSystem.B.dylib /usr/lib/libgcc_s.1.dylib: /usr/lib/libSystem.B.dylib /usr/lib/libncurses.5.4.dylib: /usr/lib/libgcc_s.1.dylib /usr/lib/libSystem.B.dylib /usr/lib/libSystem.B.dylib: /usr/lib/system/libmathCommon.A.dylib Here’s the script which was written by Marc Liyanage: #!/usr/bin/perl # # Written by […]