Clang: Undefined symbols, but it is there using nm.
clang use ld command to make the final link, I checked the manual and found -U
and -undefined
can ignore undefined symbols.
-U symbol_name
Specified that it is ok for symbol_name to have no definition. With two_levelnamespace, the resulting symbol will be marked dynamic_lookup which means dyld will search all loaded images.
-undefined treatment
Specifies how undefined symbols are to be treated. Options are: error, warning, suppress, or dynamic_lookup. The default is error.
So the final solution is set -Wl,-undefined,dynamic_lookup
to OTHER_LDFLAGS
, also make sure search path set correctly. It works.
Clang: Undefined symbols, but it is there using nm.的更多相关文章
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_The49DayPersonalFullscreenGiftModel", referenced from: objc-class-ref in The49DayPersonalRoomGiftModel.o ld: symbol(s) not found for a
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_The49DayPersonalFullscreenGiftModel&q ...
- Undefined symbols for architecture x86_64: ( linker command failed with exit code 1)
当出现 linker command failed with exit code 1 (use -v to see invocation) 的错误总结,具体内容如下: Undefined symbo ...
- 当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386
当将AFNetworking添加到工程后编译时出现 Undefined symbols for architecture i386: "_SecCertificateCopyData&quo ...
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GiftAnimationView"
1> error 详情: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GiftAnimationView&quo ...
- Undefined symbols for architecture i386: "_deflate", referenced from:
Undefined symbols for architecture i386: "_deflate", referenced from: PlatCompress(enumCom ...
- iOS工程集成支付宝错误Undefined symbols for architecture armv7
问题描述: 新工程中需要集成支付宝功能,于是咱就把支付宝的库给集成了进入然后就出现了下面这种错误了说,错误信息如下: Undefined symbols for architecture armv7: ...
- Undefined symbols for architecture i386: "MyGetOpenALAudioData(__CFURL const*, int*, int*, int*)"
今天把apple developer上的例子程序oalTouch中的MyOpenALSupport.h和MyOpenALSupport.c添加到自己的工程中,并在另一个文件xxx.cpp里调用,结果出 ...
- 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 std::basic_string<char, std::char_traits<char>
Undefined symbols for architecture i386: “_OBJC_CLASS_$_XXX”, referenced from: objc-class-ref in XXX ...
随机推荐
- AngularJS 输入验证
AngularJS 表单和控件可以验证输入的数据. 实例 <!DOCTYPE html> <html> <script src= "http://apps.bd ...
- C# dynamic 动态创建 json
1. 如何通过C# 的dynamic 创建如下json 对象? { "query": { "match": [{ "name": " ...
- C#用链式方法表达循环嵌套
情节故事得有情节,不喜欢情节的朋友可看第1版代码,然后直接跳至“三.想要链式写法” 一.起缘 故事缘于一位朋友的一道题: 朋友四人玩LOL游戏.第一局,分别选择位置:中单,上单,ADC,辅助:第二局新 ...
- Arduino 1602液晶屏实验和程序
在Arduino IDE中, 项目->加载库->管理库中搜索LiquidCrystal,然后安装即可 1.接线图 2.引脚图 3.最简单程序 #include <LiquidCrys ...
- 浅谈Linux内存管理机制
经常遇到一些刚接触Linux的新手会问内存占用怎么那么多?在Linux中经常发现空闲内存很少,似乎所有的内存都被系统占用了,表面感觉是内存不够用了,其实不然.这是Linux内存管理的一个优秀特性,在这 ...
- nth-of-type在选择class的时候需要注意的一个小问题
查了下w3和MDN的手册,没发现有这个说明,写篇随笔记下. 1..class:nth-of-type(n)在选择class的时候,如果在class前面插入x个同类型标签,n需要加上x <!DOC ...
- Vim Using
1 2 set nu 3 set backup 4 set bg=light 5 " transform tab to space 6 set expandtab 7 " auto ...
- 【原】为什么选择iPhone5的分辨率作为H5视觉稿尺寸
[20160105更新:可以用iPhone6分辨率为视觉稿尺寸啦] 又是一年的520网络情人节,深圳这边却下了大雨,这雨只能是单身汉的泪,而对于我来说这一天具有特别的意义,一来怀念父亲,二来对我这种结 ...
- C语言文法
C语言文法 源程序 → 外部声明 | 子程序(外部声明) 外部声明 → 函数定义| 函数声明 函数定义 → 类型标识符(复合句) 标识符类型 → 无类型 | 字符型 | 整型 | 浮点型 整型→ ...
- Linux下的C Socket编程 -- 简介与client端的处理
Linux下的C Socket编程(一) 介绍 Socket是进程间通信的方式之一,是进程间的通信.这里说的进程并不一定是在同一台机器上也有可能是通过网络连接的不同机器上.只要他们之间建立起了sock ...