我最近为 Cocotron 构建了一个 linux 平台接口,并且能够毫无错误地构建 Foundation 框架。
但是,在链接我的 Objective-C 项目时,出现链接器错误:
/Developer/Cocotron/1.0/Linux/i386/Frameworks/Foundation.framework//libFoundation.so:未定义引用`__gnu_objc_personality_v0'
我做了一些谷歌搜索,但没有发现任何有用的东西。
这是我的 ld 命令行(为了便于阅读而简化了一点):
Ld /Users/me/MyProject/build/Linux/Release/ENCLAnalyzer normal i386
cd /Users/me/MyProject
/Developer/Cocotron/1.0/Linux/i386/gcc-4.3.1/bin/i386-ubuntu-linux-gcc -arch i386
-L/Users/me/MyProject/build/Linux/Release
-L../../frameworks/Shared/FFmpeg/Linux/lib
-L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/lib
-L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/mkl/9.0/lib/32
-L/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/ipp/5.1/ia32/sharedlib
-L/Users/me/frameworks/Shared/FFmpeg/Linux/lib
-F/Users/me/MyProject/build/Linux/Release
-F/Users/me/frameworks/Shared
-F/Developer/Cocotron/1.0/Linux/i386/Frameworks
-F/Users/me/frameworks/OtherProject/Linux
-filelist "/Users/me/MyProject/build/Linux/MyProject.build/Release/MyProject Linux.build/Objects-normal/i386/MyProject.LinkFileList"
-Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/lib
-Wl,-rpath-link,../../frameworks/Shared/FFmpeg/Linux/lib
-Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/ipp/5.1/ia32/sharedlib
-Wl,-rpath-link,/Developer/Cocotron/1.0/PlatformInterfaces/i386-ubuntu-linux/intel/mkl/9.0/lib/32
-Wl,-rpath-link,/Developer/Cocotron/1.0/Linux/i386/Frameworks/Foundation.framework
-framework Foundation -framework MyFramework1 -framework MyFramework2 -framework MyFramework3
-o /Users/me/MyProject/build/Linux/Release/MyProject
我有一种感觉,基础项目需要链接到它不是的库,或者它可能链接到某个库的错误版本。但我不确定。
任何帮助将非常感激。