静态库引入引起的错误解决方案,ld: warning: ignoring file ”…/XXX.a”, file was built for archive which is not the architecture being linked (armv7): “…/XXX.a” Undefined symbols for architecture armv7: "_OBJC_CLASS_$
想目中不免会引入一些静态库,可是有时加入'.a'文件后编译便会报以下错误
ld: warning: ignoring file ”…/XXX.a”, file was built for archive which is not the architecture being linked (armv7): “…/XXX.a”
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_XXX", referenced from:
objc-class-ref in XXX.o
百度得到的第一页的大部分答案是找不到路径或'.a'文件缺失
参考:http://www.cocoachina.com/bbs/read.php?tid-247940.html
http://blog.csdn.net/kaizi318/article/details/10362673
http://www.cnblogs.com/zxykit/p/5165857.html
http://blog.csdn.net/bindu27227/article/details/23706369
但是这并不能解决这次遇到的问题
这次的文件导入后出现一个奇怪的现象,模拟器和iOS 9.3.1的真机调试都会报上面出现的错误,但是iOS 10.2.1却可以正常运行。
问题大体可以定位到以下几处:
1.工程没有找到导入的'.a'的路径。
解决:查看Library Search Paths看看是否包含了相应的静态库的路径(参考http://blog.csdn.net/u012703795/article/details/24464837)。
2.导入的'.a'文件有问题
解决:查看'.a'文件支持的arm指令集(参考:http://stackoverflow.com/questions/34844932/error-ld-warning-ignoring-file-libfile01-a-file-was-built-for-archive-which
和 http://blog.csdn.net/lvxiangan/article/details/42486731)
经过上面的操作后发现这次导入的'.a'文件仅支持arm64,这样的'.a'文件也是醉醉的
于是将Valid Architectures 改为仅有arm64,再次编译运行。。。
这次该好了吧,然而并没有
lb ‘/…/XXX.a’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code (use -v to see invocation)
解决:参考http://blog.csdn.net/zhyl8157121/article/details/48528831
再次运行,OK
静态库引入引起的错误解决方案,ld: warning: ignoring file ”…/XXX.a”, file was built for archive which is not the architecture being linked (armv7): “…/XXX.a” Undefined symbols for architecture armv7: "_OBJC_CLASS_$的更多相关文章
- Undefined symbols for architecture armv7: "_OBJC_METACLASS_$_ _OBJC_CLASS_$_ ld: symbol(s) not found for architecture armv7错误
Undefined symbols for architecture armv7: "_OBJC_METACLASS_$_MWPhotoBrowser", referenced ...
- iOS工程集成支付宝错误Undefined symbols for architecture armv7
问题描述: 新工程中需要集成支付宝功能,于是咱就把支付宝的库给集成了进入然后就出现了下面这种错误了说,错误信息如下: Undefined symbols for architecture armv7: ...
- Undefined symbols for architecture armv7错误解决方法
Undefined symbols for architecture armv7: "_OBJC_CLASS_$_BriefMainModel", referenced from: ...
- Xcode调用旧版本库出现Undefined symbols for architecture x86_64: ld: symbol(s) not found for architecture x86_64
问题:Undefined symbols for architecture x86_64: ld: symbol(s) not found for architecture x86_64 问题原因 ...
- iOS编译错误#ld: warning: ignoring file# 之 Undefined symbols for architecture x86_64 - ld: symbol(s) not found for architecture x86_64
ld: warning: ignoring file xxxPath/libbaidumapapi.a, missing required architecture x86_64 in file xx ...
- iOS出现 Undefined symbols for architecture armv7 std::basic_string<char, std::char_traits<char>
Undefined symbols for architecture i386: “_OBJC_CLASS_$_XXX”, referenced from: objc-class-ref in XXX ...
- Undefined symbols for architecture arm64解决方案
在iOS开发中经常遇到的一个错误是Undefined symbols for architecture arm64,这个错误表示工程某些地方不支持arm64指令集.那我们应该怎么解决这个问题了?我们不 ...
- Xcode编译Undefined symbols for architecture xxx 错误总结
可能会遇到这几种错误:Undefined symbols for architecture armv7Undefined symbols for architecture armv7sUndefine ...
- Undefined symbols for architecture armv7
xcode编译过程中出现如下问题Undefined symbols for architecture armv7:... ld: symbol(s) not found for architectur ...
随机推荐
- 树莓派、 Arduino 、传统单片机开发板该如何选择?
几十年前的电子爱好者,最喜欢的就是电烙铁.面包板和收音机:十几年前,出现了单片机,于是玩具就成了电烙铁.面包板和单片机:到了2015年,贴片技术的不断普及,让面包板不再那么有用武之地,经济的发展也让现 ...
- SharePoint管理中心配置内容数据库
SharePoint管理中心配置内容数据库 在SharePoint2010中,内容数据库是组织数据的核心. 是全部站点内容信息,如文档.列表数据和Web部件属性等存储的地方.默认地,内 ...
- Vim使用技巧(2) -- 插入模式技巧 【持续更新】
组合快捷键 Ctrl + h //删除前一个字母(同退格键) Ctrl + w //删除前一个单词 Ctrl + u //删除到行首 Esc //切换到普通模式 Ctrl + [ //切换到普通模式 ...
- PowerDesigner如何导出表到word的方法
from:https://jingyan.baidu.com/article/295430f1c385970c7f005056.html PowerDesigner如何导出表到word的方法 听语音 ...
- OSPF-lsa-types
- Youth Is Not a Time of Life
Youth is not a time of life; it is a state of mind.青春不是年华,而是心境: It is not a matter of rosy cheeks, r ...
- EasyNVR现场部署搭配EasyNVS云端集中控制应用于幼儿园直播场景的最佳方案!
在之前的介绍中,我们已经介绍了很多EasyNVR成功应用于幼儿园类教育直播的场景,例如<EasyDarwin幼教云视频平台在幼教平台领域大放异彩!>.<基于EasyDarwin云视频 ...
- Spring JDBC-混合框架的事务管理
Spring 抽象的 DAO 体系兼容多种数据访问技术,它们各有特色,各有千秋. Hibernate 是非常优秀的 ORM 实现方案,但对底层 SQL 的控制不太方便 MyBatis 则通过模板化 ...
- C# new和override区别(转)
override 1. override是派生类用来重写基类中方法的: 2. override不能重写非虚方法和静态方法: 3. override只能重写用virtual.abstract.overr ...
- nosql_action
ps -aux 查当前端口占用 connecting to: test > show dbs local .078125GB testphp .203125GB > use testph ...