静态库引入引起的错误解决方案,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 ...
随机推荐
- Springboot集成权限管理框架apache shiro
一.名词解释 网上一大堆 二.pom依赖 <dependency> <groupId>org.apache.shiro</groupId> <artifact ...
- linux中if[[ $file == r* ]]的空格
ls $usridir/$line | while read file do if [[ $file==access.log.* ]] then echo $file "hahahah&qu ...
- Introdution to Spring Mobile
1. In Eclipse, create a new Maven Project using the spring-mvc-jpa-archetype. 2. Add the spring-mobi ...
- A - Bi-shoe and Phi-shoe 欧拉函数
/** 题目:A - Bi-shoe and Phi-shoe 链接:https://vjudge.net/contest/154246#problem/A 题意:每一个数都有一个得分,它的得分就是, ...
- Oracle基础学习登陆SQLPLUS(一)
SQLPLUS是ORACLE公司开发的非常简洁的管理工具,SQLPLUS是最好的,最核心的ORACLE管理工具.SQLPLUS简洁而高效,舍弃浮华,反璞归真.使用sqlplus,进入sqlplus并进 ...
- IE的坏脾气——3像素Bug
在一个典型的浮动中,如下面的图片所示:灰色矩形是外部容器,绿色容器在外部容器内向左浮动,未浮动的部分包围着浮动部分.但是IE6在解析这样的浮动时,会莫名的给靠紧浮动部分的未浮动部分添加3个像素的边距. ...
- 自己动手写ORM(01):解析表达式树生成Sql碎片
在EF中,我们查询数据时可能会用拉姆达表达式 Where(Func<T,ture> func)这个方法来筛选数据,例如,我们定义一个User实体类 public class User { ...
- hdu 2460(tarjan求边双连通分量+LCA)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2460 思路:题目的意思是要求在原图中加边后桥的数量,首先我们可以通过Tarjan求边双连通分量,对于边 ...
- Android开发:TableFixHeaders源码分析
最近需要在android上的展示表格数据,在github上找到了TableFixHeaders(https://github.com/InQBarna/TableFixHeaders). 项目文件最主 ...
- 如何在Java的Filter中注入Service???
今天在做用户使用cookie自动登录的时候,发现在LoginFilter中读取到cookie以后要进行查询数据库然后进行用户名和密码的比对,查询数据库肯定要用到Service和Dao,一开始我以为在s ...