截断的胖文件链接器错误 [英] Truncated Fat File Linker Error

查看:505
本文介绍了截断的胖文件链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我熟悉用Objective-C进行开发,但在错误解释方面,我仍然认为自己有点n00b.我正在为其他人也在工作的应用程序工作.我相信我们可能拥有不同版本的Xcode,并且一个开发人员拥有一台PC(其他人和我拥有MacBook).我正在使用Xcode 4.5.1.

Although I am familiar to developing in Objective-C, I still consider myself a bit of a n00b when it comes to error interpretation. I working on an application for work that others are also working on. I believe we may have different versions of Xcode, and one developer has a PC (the others and I have a MacBook). I am using Xcode 4.5.1.

问题

我收到以下 Apple Mach-O Linker Error :

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

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

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

The full error is as follows (paths renamed):

Ld build/Debug-iphonesimulator/MyApp.app/MyApp正常的i386 cd/用户/我/文档/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-框架CoreBluetooth -framework MediaPlayer -framework QuartzCore-框架UIKit-框架基础-框架 CoreGraphics-框架FacebookSDK -o /Users/me/Documents/MyApp/trunk/build/Debug-iphonesimulator/MyApp.app/MyApp

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版本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/用户/我/文档/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 -正常/i386/MyApp.LinkFileList -objc_abi_version 2 -lsqlite3.0 -no_implicit_dylibs-框架MobileCoreServices-弱框架帐户-弱框架AdSupport -weak_framework社交-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 .一种 -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的切片是文件末尾,用于体系结构i386,长度为135 clang:错误:链接器命令失败,退出代码为1(使用-v查看 调用)

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 failed with exit code 1 (use -v to see invocation)

我几乎没有找到关于此错误的文档.有什么问题?我该如何解决这样的错误?

I have found close to no documentation on this error. What's the problem? How do I resolve an error like this?

推荐答案

我在某处阅读了此答案,

I read this answer somewhere,

从MAC-OS/X移到Windows时,指向文件和文件夹(在您的情况下为某些框架)的符号链接将转换为胖文件.因此,每当我们从您的MAC复制粘贴/签出项目框架到Windows或反之时,它都会发生更改,这些文件会根据符号链接进行修改.

Symbolic links to files and folders (in your case some framework) are turned into fat files when they are moved from MAC-OS/X to Windows. So whenever we copy-paste/checkout project frameworks from your MAC to windows or vice versa it gets changed, the files are modified in terms of symlinks.

因此,您只需要签出项目文件并单独替换框架即可(请注意,要替换的框架应从MAC下载而不是从Windows而不是WINDOWS处下载或复制).

So what you can do is just checkout your project files and replace the framework alone (please note the framework you are going to replace should be downloaded fresh or copied somewhere from a MAC , NOT WINDOWS).

希望这对某人有帮助!

这篇关于截断的胖文件链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆