加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Xcode链接错误:文件太小,不适用于架构armv7

发布时间:2020-12-14 17:56:07 所属栏目:百科 来源:网络整理
导读:我得到这个奇怪的链接器错误: 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 w
我得到这个奇怪的链接器错误:

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时,它们会变成平面文件.你需要更新它们.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读