Other Linker Flags参数 -ObjC、-all_load和-force_load
来源:互联网 发布:linux 安装ant 编辑:程序博客网 时间:2024/05/22 02:20
-ObjC
这个flag告诉链接器把库中定义的Objective-C类和Category都加载进来。这样编译之后的app会变大(因为加载了其他的objc代码进来)。但是如果静态库中有类和category的话只有加入这个flag才行。
-all_load
这个flag是专门处理-ObjC的一个bug的。用了-ObjC以后,如果类库中只有category没有类的时候这些category还是加载不进来。变通方法就是加入-all_load或者-force-load。-all_load会强制链接器把目标文件都加载进来,即使没有objc代码。
注意:假如你使用了不止一个静态库文件,然后又使用了这个参数,那么你很有可能会遇到ld: duplicate symbol错误,因为不同的库文件里面可能会有相同的目标文件
-force_load
这个flag所做的事情跟-all_load其实是一样的,只是-force_load需要指定要进行全部加载的库文件的路径,这样的话,你就只是完全加载了一个库文件,不影响其余库文件的按需加载 ,-force_load在xcode3.2后可用
在Xcode4.2之后,这个链接器bug已经被修复,因此-all_load 和 -force_load标志都不再需要了。在必要时添加-ObjC即可。
0 0
- Other Linker Flags参数-ObjC、-all_load和-force_load讲解
- Other Linker Flags参数-ObjC、-all_load和-force_load讲解
- Other Linker Flags参数 -ObjC、-all_load和-force_load
- Other Linker Flags中添加-ObjC和-all_load 什么意思
- Other Linker Flags 中加入-ObjC或者-all_load 作用
- other linker flags objc配置
- -all_load -force_load -ObjC
- -all_load -force_load -ObjC
- -all_load -force_load -ObjC
- -ObjC -all_load -force_load
- -all_load -force_load -ObjC
- Xcode -ObjC, -force_load,-all_load
- -ObjC, -all_load, -force_load
- -ObjC、-all_load、-force_load使用
- -all_load -force_load -ObjC 的使用
- -all_load -force_load -ObjC使用解释
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- Unity3D 优化总结
- Hibernate项目建立
- PHP基础知识构造函数与析构函数
- mysql编码问题解决办法
- 对大二一年学习的反思总结
- Other Linker Flags参数 -ObjC、-all_load和-force_load
- 如何快糙好猛地在Windows下编译CAFFE并使用其matlab和python接口
- 【SSH进阶】No result defined for action **的解决方案
- spark-submit工具参数说明
- python matplotlib绘图设置坐标轴刻度、文本
- 【Hihocder 1329】——Splay
- 安卓之简单实现右边的抽屉Drawrlayout
- UML建模学习5:Use-case Diagram
- 设计模式