Other flag Linker
来源:互联网 发布:复杂json解析 编辑:程序博客网 时间:2024/06/13 12:20
- -all_load -force_load -ObjC
- -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_loadIMPORTANT: 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_loadWhen 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.aThis insures that ONLY your library is loaded, not every library.
0 0
- Other flag Linker
- ios 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 flag的含义
- 修改链接参数(Other Linker Flag)
- IOS项目为什么加入静态数据库需要加入-ObjC and -all-load in Other Linker Flag
- <iOS>other linker flags
- <iOS>other linker flags
- other linker flags
- <iOS>other linker flags
- Other linker flags
- <iOS>other linker flags
- other linker flags
- ListView嵌套GridView使用详解及注意事项
- DM365的UBL源码分析
- SAP IDOC 开发介绍
- 资源在另一个编辑器中打开解决
- eclipse ssh插件 (struts2 spring3 hibernate4)
- Other flag Linker
- poj 3311 Hie with the Pie 【旅行商+回原点】
- gvim 特殊的编辑指令("dw")
- QML类型说明-LevelAdjust
- 对比MFC ,Winform ,WPF
- Android WebView加载显示进度条
- 0-1背包模板
- 我的第一篇文章。
- Phalcon中使用UnitTest