Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

[Solved]install_name_tool of mac can't change the id

$
0
0
I need to let the app know where to find the 3rd party dylib Study a lot of data but still don’t get it With the help of otool otool -L imageInterpolation.app/Contents/MacOS/imageInterpolation otool give me the following message of the 3rd party dylib lib/libopencv_core.2.4.dylib (compatibility version 2.4.0, current version 2.4.3) I suppose this is the original id of the dylib? To tell the app how to link to the dylib First, create a folder inside the app change the id of the dylib by the install_name_tool install_name_tool -id @executable_path/../Frameworks/libopencv_core.2.4.3.dylib      lib/libopencv_core.2.4.dylib But this would pop out error message install_name_tool: can’t open file: lib/libopencv_core.2.4.3.dylib (No such file or directory) To solve the problems, I copy the dylib “libopencv_core.2.4.3.dylib” to “/lib” and change the name to “libopencv_core.2.4.dylib” Run the command install_name_tool -id @executable_path/../Frameworks/libopencv_core.2.4.3.dylib      /lib/libopencv_core.2.4.dylib" This time, no error or warning, but the id remain the same That is, When I run the otool otool -L imageInterpolation.app/Contents/MacOS/imageInterpolation The result is lib/libopencv_core.2.4.dylib (compatibility version 2.4.0, current version 2.4.3)

Viewing all articles
Browse latest Browse all 18427

Trending Articles