Xcode 7.1 中架构 arm64 的未定义符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33446600/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:08:44  来源:igfitidea点击:

Undefined symbols for architecture arm64 in Xcode 7.1

iosobjective-cxcode

提问by RAM

Hi when I try to run my app in Xcode 7.1 on device , I am getting the following error. Can you pls let me know the issue. It runs fine on simulator.

嗨,当我尝试在设备上的 Xcode 7.1 中运行我的应用程序时,出现以下错误。你能告诉我这个问题吗?它在模拟器上运行良好。

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_ADAuthenticationContext", referenced from: objc-class-ref in LoadingViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

架构 arm64 的未定义符号:“_OBJC_CLASS_$_ADAuthenticationContext”,引用自:LoadingViewController.o ld 中的 objc-class-ref:找不到架构 arm64 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v查看调用)

回答by Eugene Dudnyk

It could be that library which consists of the class ADAuthenticationContextisn't compiled for arm64architecture, only for armv7/ armv7s.

可能是由该类组成的库ADAuthenticationContext不是为arm64体系结构编译的,而是为armv7/编译的armv7s

You can disable arm64support in your project by modifying Supported Architecturesand Valid Architecturesin Build Settings, then for this case compilation and linking should work.

您可以禁用arm64通过修改你的项目支持支持的体系有效的体系结构生成设置,那么这种情况下编译和链接应该工作。

Note that App Store won't accept your app without arm64support.

请注意,App Store 不会在没有arm64支持的情况下接受您的应用。

Try to update your library or recompile it by yourself properly if possible.

如果可能,请尝试更新您的库或自行重新编译。