-all_load链接器标志是做什么的? [英] What does the -all_load linker flag do?

查看:95
本文介绍了-all_load链接器标志是做什么的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编译Objective-C代码时,我无法找到任何地方的-all_load标志。



我有一些上传二进制文件到Apple的问题,他们说它是因为我没有使用这个标志,但是我的代码甚至没有它编译。<​​/ p> $ b

感谢

解决方案

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


重要说明:对于64位和iPhone OS应用程序,存在一个链接器错误,阻止-ObjC从仅包含类别的静态库中加载对象文件没有课。解决方法是使用-all_load或-force_load标志。 -all_load强制链接器从它看到的每个归档中加载所有对象文件,即使那些没有Objective-C代码的文件。 -force_load在Xcode 3.2和更高版本中可用。它允许更精细的谷物控制归档加载。每个-force_load选项后面都必须有一个存档路径,并且该存档中的每个目标文件都将被加载。



I can't find anywhere what the -all_load flag do when compiling Objective-C code.

I have some issues uploading binaries to Apple, the they say it's because I didn't use this flag, but my code compiles even without it.

Can some one help me with that?

Thanks

解决方案

It is probably related to this technical note 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.

这篇关于-all_load链接器标志是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆