There is a missing library. Executables using dynamic libraries have both a list of those libraries, and possible paths to search when looking for them, called the run path list. The list of libraries can be either full or relative paths. If the paths are relative, the linker searches for them under each element of the run path list. (You can see the list of expected libraries with otool -L
.)
The @executable_path
is a variable that the dynamic linker replaces with the full path to the executable when doing this searching. So the linker is looking for the library at /path/to/App.app/Contents/MacOS/app_executable/InDesignModel.framework/Versions/A/InDesignModel
, but it's not there.
The solution is to update the run time path list of the executable, using install_name_tool
. You would do something like:
$ install_name_tool -add_rpath /path/to/InDesignModel app_binary
Alternatively, you can add to the @rpath
directly during compilation, by adding the link flags -Wl,-rpath,/path/to/InDesignModel
.