2012-11-12 36 views
1

我有一个二进制文件,我链接到Python.framework针对当前版本的Python.framework链接

通过otool -L <binary>,它似乎链接到完整的符号链接解析路径,即/System/Library/Frameworks/Python.framework/Versions/2.7/Python而不是/System/Library/Frameworks/Python.framework/Versions/Current/Python。从只有Python的2.6框架的用户,我也得到了它抛出这个错误报告:

Dyld Error Message: 
    Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python 
    Referenced from: /Applications/MusicPlayer.app/Contents/MacOS/MusicPlayer 
    Reason: image not found 

我怎么能告诉Xcode中,它应该链接到/System/Library/Frameworks/Python.framework/Versions/Current/Python

回答

0

设置目标的Link Binary with Libraries允许您使用许多不同的版本。使用无版本libpython.dyld(上一个):

enter image description here

+0

我使用libpython2.6.dylib,因为它使测试更容易。但是,谢谢! – Albert

0

不能链接到“当前”版本,因为它可能被更新为指向,从根本上打破了库接口的新版本,你”重新对抗。