xcode iOS 构建设置其他链接器标志
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37348790/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS Build settings Other Linker Flags
提问by nishith Singh
I have a project which is written in swift and i was trying to integrate GoogleSignIn in my project when the program kept crashing saying:
我有一个用 swift 编写的项目,当程序不断崩溃时,我试图将 GoogleSignIn 集成到我的项目中:
-[__NSDictionaryI gtm_httpArgumentsString]: unrecognized selector sent to instance
Then I googled the problem and found a solution to add -ObjC Other Linker Flag to my build settings.
然后我用谷歌搜索了这个问题并找到了一个解决方案,将 -ObjC Other Linker Flag 添加到我的构建设置中。
So my question is what does this step does and how did it fix the problem. Can anyone please explain what is Other Linker Flag and what it does?
所以我的问题是这一步做了什么以及它是如何解决问题的。任何人都可以解释什么是其他链接器标志以及它的作用吗?
回答by David 'mArm' Ansermot
For your explanations about the "Other Linker Flag" and why fix the problem like this see :
https://developer.apple.com/library/mac/qa/qa1490/_index.html
有关“其他链接器标志”的解释以及为什么要解决这样的问题,请参见:https:
//developer.apple.com/library/mac/qa/qa1490/_index.html
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.
此标志使链接器加载库中定义 Objective-C 类或类别的每个目标文件。虽然此选项通常会导致更大的可执行文件(由于加载到应用程序中的额外目标代码),但它允许成功创建包含现有类类别的有效 Objective-C 静态库。