2015-12-30 72 views
0

這裏是我的錯誤:(的ffmpeg的更新版本)聯libavcodec的OS X的ffmpeg ApplicationServices.framework

dyld: Library not loaded: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 
    Referenced from: /Users/me/path/to/lib/libavcodec.dylib 
    Reason: Incompatible library version: libavcodec.dylib requires version 64.0.0 or later, but ApplicationServices provides version 1.0.0 

我已閱讀上,這樣說,你需要鏈接ApplicationServices.framework的問題...我這樣做,這都沒有區別......

...我已經尋找該框架的其他版本:

$ mdfind ApplicationServices.framework 
/System/Library/Frameworks/ApplicationServices.framework 

只是一個...

所以後來檢查框架...

$ otool -L /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices: 
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0) 
    /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 600.0.0) 
... 

和libavcodec

otool -L ../lib/libavcodec.dylib 
../lib/libavcodec.dylib: 
    libavcodec.dylib (compatibility version 56.0.0, current version 56.60.100) 
    @loader_path/libswresample.dylib (compatibility version 1.0.0, current version ... 
... 
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 64.0.0, current version 600.0.0) 

我編譯具有-mmacosx-version-min=10.7

所以也許在工具鏈中的錯誤一切嗎?

編譯:

clang -v 
Apple LLVM version 7.0.2 (clang-700.1.81) 
Target: x86_64-apple-darwin15.2.0 
Thread model: posix 

鏈接:

ld -v 
@(#)PROGRAM:ld PROJECT:ld64-253.9 
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS) 
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81) 

回答

0

好像在鏗鏘的錯誤,我重新安裝的Xcode 6.x和現在的libavcodec的otool輸出是:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 600.0.0) 

它仍然與庫本身的輸出不匹配......但它的兼容性版本足夠低......我會看到如果我可以隔離並提交一個bug ...

+0

真棒......再次遇到這個...... 7個月後,在同一個問題上浪費時間...... –