ios – 截断的胖文件链接器错误

ios – 截断的胖文件链接器错误,第1张

概述虽然我熟悉Objective-C的开发,但在错误解释方面,我仍然认为自己有点像n00b.我正致力于其他人也在努力的工作申请.我相信我们可能有不同版本的 Xcode,一个开发人员有一台PC(其他人和我有一台MacBook).我正在使用Xcode 4.5.1. 问题 我得到以下Apple Mach-O链接器错误: ld: truncated fat file. Slice from 68 to 278 虽然我熟悉Objective-C的开发,但在错误解释方面,我仍然认为自己有点像n00b.我正致力于其他人也在努力的工作申请.我相信我们可能有不同版本的 Xcode,一个开发人员有一台PC(其他人和我有一台MacBook).我正在使用Xcode 4.5.1.

问题

我得到以下Apple Mach-O链接器错误:

ld: truncated fat file. Slice from 68 to 2783300 is past end of file
with length 135 for architecture i386 clang: error: linker command
@R_502_5138@ with exit code 1 (use -v to see invocation)

完整错误如下(路径重命名):

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/bin:/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 Accounts -weak_framework AdSupport -weak_framework Social -framework CoreBluetooth -framework MediaPlayer -framework
QuartzCore -framework UIKit -framework Foundation -framework
CoreGraphics -framework FacebookSDK -o
/Users/me/documents/MyApp/trunk/build/DeBUG-iphonesimulator/MyApp.app/MyApp

Apple clang version 4.1 (Tags/Apple/clang-421.11.66) (based on LLVM
3.1svn) Target: i386-apple-darwin11.4.2 Thread model: 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 Social -framework CoreBluetooth -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework FacebookSDK -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: truncated fat file. Slice from 68 to 2783300 is past end of file with length 135 for architecture i386
clang: error: linker command @R_502_5138@ with exit code 1 (use -v to see
invocation)

我发现这个错误几乎没有文档.有什么问题?我该如何解决这样的错误?

解决方法 我在某处读到了这个答案,

文件和文件夹的符号链接(在您的情况下是一些框架)在从MAC-OS / X移动到windows时会变成胖文件.因此,无论何时我们将项目框架从MAC复制粘贴/签出到窗口,反之亦然,它都会被更改,文件会根据符号链接进行修改.

所以你可以做的只是检查你的项目文件并单独替换框架(请注意你要替换的框架应该是新的或从MAC,而不是windows的某处复制).

希望这有助于某人!

总结

以上是内存溢出为你收集整理的ios – 截断的胖文件链接器错误全部内容,希望文章能够帮你解决ios – 截断的胖文件链接器错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1104111.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存