linker command failed with exit code 1 (use -v to see
转自 :http://www.reader8.cn/jiaocheng/20131022/2003334.html
Undefined symbols for architecture http://www.reader8.cn/jiaocheng/20131022/2003334.html:
"_utf8_nextCharSafeBody", referenced from:
-[SRWebSocket _innerPumpScanner] in AVOSCloud(SRWebSocket.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我是用pod添加的avos,之前使用过多次avos都没出现过问题,这次莫名奇妙出现了这个问题,不知道少引了什么。。。
这是因为从 2.5.9 开始,AVOSCloud 增加了实时通信的功能, 会依赖 libicucore.dylib 。
linker command failed with exit code 1 (use -v to see invocation)的错误调试情况1、linker command fai
linker command failed with exit code 1 (use -v to see invocation)的错误调试
情况1、
linker command failed with exit code 1 (use -v to see invocation)这个错误貌似遇见并不止一次,当我想用某个第三方类库的时候(如SBJson),我直接把类库文件copy到工程目录里面,然后一编译就出现这样错误(并不是一定会出这样错误),开始以为是网上下载的类库本身问题,所以重新找类库或者其他方式将它添加进去,只要不出错就行,也一直没有深入了解根本问题,今天在给工程添加一个FMDB(SQLIte第三方类库)文件编译时又出现这种错误,一开始以为工程问题,但是新建工程后还是出现这个问题,经过网上查找,得到了解决办法;
[cpp] view plaincopy
- Undefined symbols for architecture i386:
- "_OBJC_CLASS_$_FMDatabase", referenced from:
- objc-class-ref in ViewController.o
- ld: symbol(s) not found for architecture i386
- clang: error: linker command failed with exit code 1 (use -v to see invocation)

在网上得到解决办法是:
在工作左边导航栏Target-->Build Phases-->compile Sources中,第三库库的所有.m文件都添加到里面,然后编译通过了;

添加.m文件

根据对比可以看见 in FMDBTest,FMDBTest的Target里添加进去了了一些.m文件

对于以上错误,根据网友解答我的理解是
我们在使用这些第三方类库文件时直接将其拖拽到工程之中,编译的的时候Xcode也没有自动引用,所以造成这样错误,这就需要我们手动添加。假如我们在工程中新建某个文件就不会出现这样问题;
参考 http://blog.hsin.tw/2012/ios-dev-undefined-symbols-for-architecture-i386/
情况2、
linker command failed with exit code 1 (use -v to see invocation)
出现这种情况很可能是,项目中引入了多个相同的文件。删除一个就ok!
情况3、
xcoder的一个编译错误:
linker command failed with exit code 1 (use -v to see invocation)
说明有无法准确找到的函数,函数有重复现象。
造成这个错误的原因是我直接在 .h头文件中实现了几个函数,然后这个头文件又被别的.c文件所引用,有实现的。
所以解决办法是把实现的几个函数单出一个.c文件里去。这样就ok了。
情况4、
把 Valid Architectures 的值改为 armv7
过程:
PROJECT --> Build Settings --> Architectures --> Valid Architectures 他的值本来是 armv7 armv7s (ios6.0下) 把armv7s 去掉即可
同样的操作
TARGETS --> Build Settings --> Architectures --> Valid Architectures 做同样的修改
情况5、 很奇葩的情况啊,就是引用第三方的静态库.a 出现了问题. 在模拟器和真机引入的静态库是分开的!!!当然如果你的静态库做成了统一的,那就不会出现情况5.
linker command failed with exit code 1 (use -v to see的更多相关文章
- symbol(s) not found for architecture x86_64 之 linker command failed with exit code 1 (use -v to see invocation)解决方案排查
这样的错误 ,我的解决方案是, 第一种: 查看他说在 ****.o 中,你要查看这样的关键点,然后去查看,你 项目中有没有引进这样的文件,在项目中查找,看项目中有没有,如果没有那就是没添加进来,你 ...
- linker command failed with exit code 1 (use -v to see invocation)
背景:用U盘从另一台电脑考过来后,出现错误 linker command failed with exit code 1 (use -v to see invocation) 出现这种情况很可能是,项 ...
- linker command failed with exit code 1 (use -v to see invocation)解决办法
[cpp] view plaincopy Undefined symbols for architecture i386: "_OBJC_CLASS_$_FMDatabase&quo ...
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
报错提示: ... ld: 6 duplicate symbols for architecture x86_64 clang: error: linker command failed with e ...
- IOS Bugs5 linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/ ...
- [Bug-IOS] - linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/Rubert/Library/Developer/Xcode/DerivedData/OC_Language-emftyzftyvhdpuaxipddjmpnpvox/Build/ ...
- (转) error: linker command failed with exit code 1 (use -v to see invocation)
转自:http://blog.csdn.net/tiantian1980/article/details/9175777 像这样的一大堆,总体说编译链接时错误 /Users/zhangtianji ...
- 添加第三方类库造成的linker command failed with exit code 1 (use -v to see invocation)的错误调试
linker command failed with exit code 1 (use -v to see invocation)这个错误貌似遇见并不止一次,当我想用某个第三方类库的时候(如SBJso ...
- linker command failed with exit code 1 (use -v to see invocation),经典Xcode编译错误的出现和解决!
linker command failed with exit code 1 (use -v to see invocation)这个肯定是个xcode编译运行的时候经典的报错了. 这个问题曾经在我的 ...
- 使用SVN clang: error: linker command failed with exit code 1 (use -v to see invocation)
然后上传到该项目SVN仓库上,例如,下面的错误再次发生再拉到本地编译 ld: library not found for -lxxxxxxxxxxxx clang: error: linker com ...
随机推荐
- CSS3 Filter滤镜效果
关注到它是在一次分享会当中,很神奇,只需写一行代码就可以变身很美的视觉效果,这就是CSS3滤镜. 语法 filter:fuction(param); 如今浏览器支持情况相比以前乐观很多,点击查看兼容 ...
- python setup.py install 报错ImportError: No module named setuptools
学习光荣之路python课程时,使用python setup.py install安装其他模块时,第一次安装某模块成功了.安装另一模块却报错ImportError: No module named s ...
- MD5的Hash长度扩展攻击
Hash长度扩展攻击 引子 无意中碰到一道题,大概代码是这样的 $flag = "XXXXXXXXXXXXXXXXXXXXXXX"; $secret = "XXXXXXX ...
- 类加载class loader
Class装载验证流程: 加载:取得类的二进制流,转为方法区的数据结构,在java堆中生成对应的java.lang.class对象 链接:就是将已经读入到内存的类的二进制数据合并到虚拟机的运行时环境中 ...
- 模仿快递路线图的html, css 样式
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- 通用mapper的使用
通用mapper的使用 导入依赖 <dependency> <groupId>com.github.abel533</groupId> <artifactId ...
- ACdream 1020 The Game about KILL
找规律. 11 3 1 3 5 7 1 3 5 7 9 11 13 15 ....... #pragma comment(linker, "/STACK:1024000000,1024000 ...
- SQLSERVER异机备份
/* 作者:landv 功能:异机备份 开发时间:2016年7月2日 15:27:08 */ ) drop procedure [dbo].[p_backupdb] GO create proc p_ ...
- 【转】cookie和session的区别
原作者:施杨(施杨's Think out)出处:http://shiyangxt.cnblogs.com ************** 本文版权归原作者和博客园共有,欢迎转载,转载请保留该申明 ** ...
- php 类型
var_dump 打印出类型和值 整型inter用 decimal 表示为 decimal : [1-9][0-9]* | 0 (int) ( (0.1+0.7) * 10 ); 强制类 ...