2011-12-07 26 views
5

我得到這個奇怪的鏈接器錯誤:Xcode的鏈接出錯:文件太小,建築的ARMv7

ld: in /Users/.../test project/iSMP.framework/iSMP, file too small for architecture armv7

collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

的Xcode VERS:4.0.2

如果我編譯模擬器,我得到

... file too small for architecture i386

谷歌沒有任何幫助..

我已經試過:

  • 明確的搜索路徑
  • 移動框架重新添加框架到不同的目錄,然後重新添加。

更新:從脂輸出-info libiSMP-2.1.A

Architectures in the fat file: libiSMP-2.1.a are: armv6 armv7 i386

所以,它不是從架構不匹配;

在此先感謝!

+3

Clean build解決了這個問題... – Ondrej

+0

這些步驟對我來說解決了這個問題:1.關閉Xcode 2.清理DerivedData文件夾3.重建 – cndv

回答

6

我已經收到了來自這個框架的支持團隊(謝謝你們)解決方案:

Symbolic links are turned into flat files when they are moved from OS/X to Windows. The iSMP framework has the following structure: iSMP.framework/iSMP (symbolic link pointing to libiSMP-2.1.a)/ Headers/libiSMP-2.1.a

To fix the issue, you might open the terminal application on Mac and move to the iSMP.framework directory. When you type 'ls -l iSMP' command you will notice that the iSMP file has no longer the 'l' attribute. You should then recreate the symbolic link by deleting the iSMP file. type then 'ln -s libiSMP.2.1.a iSMP' .This will create the link.

You may now rebuild the project.

Another solution to fix the problem is to delete the iSMP file and rename libiSMP-xx.a to iSMP.

TL/DR:符號鏈接變成平面文件,當他們從OS移動/ X到視窗。你需要更新它們。

+1

這幫了我的忙。我重新創建了符號鏈接,它工作。 – nsantorello

+0

我有類似的問題與libjpeg.dylib,我取代了整個dylib本身。 – 2am