Xcode, building and dylibs

前端 未结 2 1037
被撕碎了的回忆
被撕碎了的回忆 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 10:47

    My tip is to look at the build output, how does it actually run ld?

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题