ld:截断的胖文件 [英] ld: truncated fat file
问题描述
在尝试运行使用NinevehGL框架的XCODE应用程序时,我发现了以下错误:
I have found these error while trying to run an XCODE application that uses NinevehGL framework:
ld: truncated fat file. Slice from 1478656 to 2279616 is past end of file with length 2270604 file './NinevehGL.framework/NinevehGL' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我真的不知道问题是什么以及如何解决这样的错误,我没有找到处理这些问题的任何文件。
I don't really know whats the problem and how to solve an error like these I didn't find any documentation handling these kind of problem .
推荐答案
尝试在项目中进行以下更改:-
Try to made following changes in your project:-
- 在链接阶段包括所有必要的框架
- 从其他链接器标记中删除
-all_load
。 - 清理构建文件夹并从头开始重新编译。
这很可能是权限问题,iOS SDK安装损坏或Xcode安装损坏。我将删除 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorXXX.sdk
,然后进入Xcode> Preferences> Downloads and重新安装iOS SDK。然后再次尝试清理并构建您的项目。
如果仍然有问题,我会考虑再次安装Xcode。
This could very well be a permission issue, a corrupt iOS SDK install, or a corrupt Xcode install. I would remove /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulatorXXX.sdk
, then go into Xcode > Preferences > Downloads and reinstall the iOS SDK. Then try again to clean and build your project.
If you still have problems, I would consider reinstalling Xcode again.
也请看看如何解决 xcode路径问题。
Also have a look how to fix xcode path problems.
这篇关于ld:截断的胖文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!