Xcode, building and dylibs

前端 未结 2 1057
被撕碎了的回忆
被撕碎了的回忆 2021-01-07 10:44

I\'ve looked at a few related questions and cannot seem to find a solution for myself.

Basically I\'m using the libmp3lame.dylib in my Xcode project. The install pro

2条回答
  •  没有蜡笔的小新
    2021-01-07 11:07

    My workaround for this issue was to do the following in terminal (I've used Automator to, well, automate this):

    install_name_tool -id @executable_path/../Frameworks/libmp3lame.0.0.0.dylib ~/path/to/lib/in/app/libmp3lame.0.0.0.dylib
    
    install_name_tool -change /usr/local/lib/libmp3lame.0.dylib @executable_path/../Frameworks/libmp3lame.0.0.0.dylib ~/path/to/app/Contents/MacOS/AppName
    

    Basically swapping the path to the library from the one in the usr local lib to the one included in the bundle.

提交回复
热议问题