截断的胖文件链接器错误

虽然我对Objective-C的开发很熟悉,但是对于错误解释,我仍然认为自己有一点点的不足。 我正在研究其他人也在从事的工作申请。 我相信我们可能有不同版本的Xcode,一个开发人员有一台PC(其他人和我有一台MacBook)。 我正在使用Xcode 4.5.1。

问题

我得到以下苹果Mach-O链接器错误

ld:截断的胖文件。 从68到2783300的片断已超过文件的结尾,长度为135,用于体系结构i386 clang:错误:链接器命令失败,退出代码1(使用-v查看调用)

完整的错误如下(重命名path):

Ld build / Debug-iphonesimulator / MyApp.app / MyApp normal i386 cd / Users / me / Documents / MyApp / trunk setenv IPHONEOS_DEPLOYMENT_TARGET 5.1 setenv PATH“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ USR /斌:/Applications/Xcode.app/Contents/Developer/usr/bin:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录:在/ usr / local / bin目录:在/ usr / X11 / bin中:/ opt / local / bin:/ usr / local / git / bin“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L / Users / me / Documents / MyApp / trunk / build / Debug-iphonesimulator -F / Users / me / Documents / MyApp / trunk / build / Debug-iphonesimulator -F / Users / me / Documents / MyApp / trunk -filelist /Users/me/Documents/MyApp/trunk/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp .LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -lsqlite3.0 -v -fobjc-arc -fobjc-link-runtime -Xlinker- no_implicit_dylibs -mios-simulator-version-min = 5.1 -framework MobileCoreServices -weak_framework帐户-weak_framework AdSupport -weak_framework社交框架CoreBluetooth -framework MediaPlayer -framework QuartzCore -framework UIKit -framework基础框架CoreGraphics -framework FacebookSDK -o / Users / me /Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp

苹果铿锵声4.1版(tags / Apple / clang-421.11.66)(基于LLVM 3.1svn)目标:i386-apple-darwin11.4.2线程模型:posix“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault .xctoolchain / usr / bin / ld“-demangle -dynamic -arch i386 -ios_simulator_version_min 5.1.0 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk – o /Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp -lcrt1.o -L / Users / me / Documents / MyApp / trunk / build / Debug-iphonesimulator -filelist / Users / me / Documents / MyApp / trunk / build / MyApp.build / Debug-iphonesimulator / MyApp.build / Objects-normal / i386 / MyApp.LinkFileList -objc_abi_version 2 -lsqlite3.0 -no_implicit_dylibs -framework MobileCoreServices -weak_framework Accounts -weak_framework AdSupport – weak_framework社交框架CoreBluetooth框架MediaPlayer框架QuartzCore框架UIKit框架基础框架CoreGraphics框架Facebo okSDK -force_load /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a -framework Foundation -lobjc -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault .xctoolchain /usr/bin/../lib/clang/ 4.1 / lib / darwin / libclang_rt.ios.a -F / Users / me / Documents / MyApp / trunk / build / Debug-iphonesimulator -F / Users / me / MyApp / trunk ld:截断的胖文件。 从68到2783300的片断已超过文件的结尾,长度为135,用于体系结构i386 clang:错误:链接器命令失败,退出代码1(使用-v查看调用)

我发现这个错误没有任何文档。 有什么问题? 如何解决这样的错误?

我在某个地方读了这个答案,

符号链接到文件和文件夹(在你的情况下,一些框架),当它们被从MAC-OS / X移到Windows时变成胖文件。 所以无论何时我们复制粘贴/签出项目框架从您的MAC到Windows或反之亦然它被改变,文件被修改在符号链接。

所以你可以做的只是检查你的项目文件,并单独replace框架(请注意你将要replace的框架应该是新鲜的或从MAC,而不是WINDOWS复制的地方)。

希望这可以帮助别人!