-all_load -force_load -ObjC
来源:互联网 发布:linux默认命令行启动 编辑:程序博客网 时间:2024/05/18 14:25
-ObjC:
This flag causes the linker to load every object file in the library that defines an Objective-C class or category.
While this option will typically result in a larger executable (due to additional object code loaded into the application),
it will allow the successful creation of effective Objective-C static libraries that contain categories on existing classes.
这个flag告诉链接器把库中定义的Objective-C类和Category都加载进来。这样编译之后的app会变大(因为加载了其他的objc代码进来)。
但是如果静态库中有类和category的话只有加入这个flag才行。
-all_load
IMPORTANT: For 64-bit and iPhone OS applications, there is a linker bug that prevents -ObjC from loading objects files from static libraries that contain only categories and no classes.
The workaround is to use the -all_load or -force_load flags. -all_load forces the linker to load all object files from every archive it sees, even those without Objective-C code.
-force_load is available in Xcode 3.2 and later. It allows finer grain control of archive loading. Each -force_load option must be followed by a path to an archive,
and every object file in that archive will be loaded.
这个flag是专门处理-ObjC的一个bug的。用了-ObjC以后,如果类库中只有category没有类的时候这些category还是加载不进来。变通方法就是加入-all_load或者-force-load。-all_laod会强制
链接器把目标文件都加载进来,即使没有objc代码。-force_load在xcode3.2后可用。但是-force_load后面必须跟一个只想静态库的路径。
-force_load
When someone uses "-all_load", every imported library is forced into memory whether its needed or not. A much better technique is "-force_load":
-force_load $(BUILT_PRODUCTS_DIR)/libarc.a
This insures that ONLY your library is loaded, not every library.
http://developer.apple.com/mac/library/qa/qa2006/qa1490.html
- -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
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- Xcode里-ObjC, -all_load, -force_load
- 敏捷在业界成功了吗?
- 如何在关闭vim文件后,屏幕上还显示之前文件的内容
- python中的sum函数.sum(axis=1)
- Hdu 4305 Lightning - 生成树计数 - 行列式求值
- 页码js,支持ajax无刷新翻页
- -all_load -force_load -ObjC
- glPolygonOffset的用法
- java RMI原理解析
- OCP-1Z0-053-V13.02-443题
- Apache的rewrite规则详细介绍
- hdu 1425 sort
- C++深入体验之旅一:C++概述
- 中国天气网接口返回json格式分析及接口(XML、图片接口)说明!
- 名字隐藏