博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【iOS】Xcode中的-all_load与-ObjC
阅读量:7090 次
发布时间:2019-06-28

本文共 987 字,大约阅读时间需要 3 分钟。

在引入静态库时,通常需要在"Other Linker Flags"中添加-all_load和-Objc属性,注释如下:

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.

 

There is a side effect: build phase take much time.

-ObjC allow the static library to use objective-c specific stuffs like kvc or categories.

-all_load solve a bug in gcc/llvm, where -ObjC is not correctly used.

转自:“http://blog.csdn.net/workhardupc100/article/details/7350809”

转载于:https://www.cnblogs.com/ftrako/archive/2012/11/07/2759288.html

你可能感兴趣的文章
js splice方法
查看>>
Linux--多网卡的7种Bond模式
查看>>
ADO 连接数据库,取到VT_DATE型日期转换成 int型
查看>>
properties 配置文件中值换行的问题
查看>>
Azure 部署 Asp.NET Core Web App
查看>>
Masonry和FDTemplateLayoutCell 结合使用示例Demo
查看>>
linux 切换用户之后变成-bash-x.x$的解决方法
查看>>
用备份控制文件做不完全恢复下的完全恢复(数据文件备份<旧>--新建表空间--控制文件备份<次新>--日志归档文件<新>)...
查看>>
python下RSA加密解密以及跨平台问题
查看>>
详解Java Spring各种依赖注入注解的区别
查看>>
android 区分wifi是5G还是2.4G(转)
查看>>
多个构造器参数使用构建器
查看>>
模板方法模式(Template Method)
查看>>
创建预编译头 Debug 正常 Release Link Error:预编译头已存在,使用第一个 PCH
查看>>
asp.net上传文件夹权限配置以及权限配置的分析
查看>>
IPC's epoch 6 is less than the last promised epoch 7
查看>>
C语言 · 寂寞的数
查看>>
android Menu 笔记
查看>>
Apache2.2和Apache2.4中httpd.conf配置文件 权限的异同
查看>>
error:Flash Download failed-“Cortex-M3”,“Programming Algorithm”【转】
查看>>