Why is install_name_tool and otool necessary for Mach-O libraries in Mac Os X?

Apple has several ways of locating shared libraries: @executable_path : relative to the main executable @loader_path : relative to the referring binary @rpath : relative to any of a list of paths. @rpath is the most recent addition, introduced in OS X 10.5. If for instance you want to have your executable in Contents/MacOS and … Read more

Determine minimum OSX version a binary was compiled for

Use otool -l /path/to/binary and inspect the LC_VERSION_MIN_MACOSX load command; specifically, the version field. For example, a binary compiled with the 10.8 SDK with deployment target (-mmacosx-version-min) 10.8 should have an LC_VERSION_MIN_MACOSX like this: Load command 9 cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.8 sdk 10.8 whereas a binary compiled with the 10.8 SDK with deployment … Read more