iphone - -all_load 链接器标志有什么作用?

标签 iphone objective-c gcc linker

在编译 Objective-C 代码时,我无法找到 -all_load 标志的作用。

我在将二进制文件上传到 Apple 时遇到了一些问题,他们说这是因为我没有使用此标志,但即使没有它,我的代码也能编译。

有人可以帮我吗?

谢谢

最佳答案

可能与这篇技术说明 https://developer.apple.com/library/content/qa/qa1490/_index.html 有关

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.

关于iphone - -all_load 链接器标志有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2906147/

相关文章:

iphone - 支持横向一圈UIVIEWS :

objective-c - 为什么 NSString stringWithString 返回指向复制字符串的指针?

c++ - 为什么相继声明的两个变量在内存中并不相邻?

iphone - 使用 iPhone 相机的点云

iphone - 在 iPhone 中添加 UILabel

iphone - QRCode在ios中编码一个简单的字符串

ios - 重新加载表格后,UILabel的背景颜色变得清晰

iphone - Objective-C 如何有选择地禁用用户交互

c++ - -static-libstdc++ 适用于 g++ 但不适用于纯 gcc?

c++ - 具有嵌套结构/类的 POD 性