xcode的other linker flag的含义
来源:互联网 发布:手机五彩闪光灯软件 编辑:程序博客网 时间:2024/05/21 23:35
今天编译项目的时候发现抛出了一个异常,<NSInvalidArgumentException>+[NSInvocation invocationWithMethodSignature:]: method signature argumentcannot be nil。但是看到项目里面是有这个类的,最后思考了下,由于是使用的runtime的调用,没有在头文件中import,所以link的时候是找不到这个类的,在网上看了下,只需要在other linker flag中添加-Objc就可以,添加之后发现正确了,不过感觉还是需要了解下这个编译选项的含义,于是在网络上查了下,最后找个一个英文的解释。
-all_load Loads all members of static archive libraries.
-ObjC Loads all members of static archive libraries that implement an Objective-C class or category.
-force_load (path_to_archive) Loads all members of the specified static archive library. Note: -all_load forces all members of all archives to be loaded. This option allows you to target a specific archive.
翻译过来就是
-all_load 加载静态库文件中的所有成员;
-ObjC 加载静态库里面的所有用objc 语言写的类或者扩展类;
-force_load(包的路径)加载指定路径的静态库文件中的所有成员。
所以对于使用runtime时候的反射调用的方法应该使用这三个中的一个进行link,以保证所有的类都可以加载到内存中供程序动态调用
- xcode的other linker flag的含义
- xcode的other linker flag的含义
- xcode的other linker flag的含义
- xcode的other linker flag的含义
- xcode的other linker flag的含义
- xcode的other linker flag的含义
- Xcode中other linker flag的设置
- xcode的-other Linker flags
- 关于Xcode的Other Linker Flags
- 关于xcode的other linker flags
- 关于Xcode的Other Linker Flags
- 关于Xcode的Other Linker Flags
- 关于Xcode上的Other linker flags
- 关于Xcode的Other Linker Flags
- 关于Xcode的Other Linker Flags
- 关于Xcode的Other Linker Flags
- 关于Xcode的Other Linker Flags
- 关于Xcode上的Other linker flags
- Xceed dataGrid scroll FixedColumnCount
- (10)ExtJS之Ext.form.filed.TextArea文本区
- 余额宝收益可能降至3%
- 串口的使用
- 类设计者的核查表----摘自C++沉思录
- xcode的other linker flag的含义
- 【机器学习系列】感知机学习代码
- oracle查看某个表空间下有多少表
- ORA-01157: cannot identify/lock data file
- 网络子系统80_inet协议族-SOCK_RAW(一)
- Gson
- 中国设立12月13日为南京大屠杀死难者国家公祭日
- Seo一般的优化步骤
- C语言求定积分