我得到这个奇怪的链接器错误:
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
谷歌没有任何帮助..
我已经尝试过:
>重新添加框架
>清晰的搜索路径
>将框架移动到不同的目录并重新添加.
更新:lipo -info libiSMP-2.1.a的输出
Architectures in the fat file: libiSMP-2.1.a are: armv6 armv7 i386
所以,它不是来自架构不匹配;
提前致谢!
我收到了这个框架的支持团队的解决方案(谢谢你们):
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移动到Windows时,它们会变成平面文件.你需要更新它们.