osx - dyld: Library not loaded ... Reason: Image not loaded -
when trying run executable i've been sent in mac os x, following error
dyld: library not loaded: libboost_atomic.dylib referenced from: /users/"directory executable in" reason: image not found trace/bpt trap:5 i have installed boost libraries , located in /opt/local/lib. think problem has executable looking in directory in when paste 'libboost_atomic.dylib' in there, doesn't mind anymore. unfortunately complains can't find next boost library.
is there easy way fix this?
find boost libraries:
$ otool -l exefile exefile: @executable_path/libboost_something.dylib (compatibility version 0.7.0, current version 0.7.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0) /usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 169.3.0) and each libboost_xxx.dylib, do:
$ install_name_tool -change @executable_path/libboost_something.dylib /opt/local/lib/libboost_something.dylib exefile and verify using otool again:
$ otool -l exefile exefile: /opt/local/lib/libboost_something.dylib (compatibility version 0.7.0, current version 0.7.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 65.1.0) /usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 169.3.0) manpages: otool install_name_tool
edit while doesn't relate third-party libraries (like boost or qt), if generating app , .dylib same xcode project can without using install_name_tool setting dynamic library install name within build settings. here's example allows app executable load .dylib ../frameworks/:

Comments
Post a Comment