码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 链接错误file was built for archive which is not the architecture being linked (i386)

时间:2015-03-15 09:31:20      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:ios

iOS 环境下,链接某个静态库(.a文件)时,Xcode 会出现链接错误:
xxx file was built for archive which is not the architecture being linked (i386)
这是因为静态库是为iOS 环境编译的,并不能在模拟器环境下使用,只要将Build 目标改成设备即可。如果是:
ld: warning: ignoring file ./libsasl2.a, file was built for archive which is not the architecture being linked (armv7): ./libsasl2.a
则表示静态库的编译目标不是armv7(可能是armv6),需重新为armv7 编译静态库。

iOS 链接错误file was built for archive which is not the architecture being linked (i386)

标签:ios

原文地址:http://blog.csdn.net/yamingwu/article/details/44265193

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!