[英]Undefined symbols for architecture error occurred
I got error when debugging iOS application and am stuck all day. 调试iOS应用程序时出现错误,并且整天卡住了。
What I did is: 我所做的是:
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_NXOAuth2Request", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_OBJC_CLASS_$_NXOAuth2AccountStore", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreErrorKey", referenced from: ___54-[GXLoginGoogleViewController setupOAuth2AccountStore]_block_invoke60 in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreAccountsDidChangeNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreDidFailToRequestAccessNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.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 _ $ _ NXOAuth2Request”,引用自:GXLoginGoogleViewController.o中的objc-class-ref。 -GXLoginGoogleViewController.o中的[[GXLoginGoogleViewController setupOAuth2AccountStore] _block_invoke60.o“ _NXOAuth2AccountStoreAccountsDidChangeNotification”,引用自:-[GXLoginGoogleViewController setupOAuth2AccountStore]在GXLoginGoogleViewController.O中对于体系结构arm64 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)
I have already searched many similar topics but I could not resolved yet. 我已经搜索了许多类似的主题,但仍无法解决。
Can anyone suggest any direction to solve this problem? 谁能建议解决这个问题的任何方向?
So when I downloaded the project from github , the first thing I noticed was that the project settings weren't set up very intuitively: 因此,当我从github下载项目时 ,我注意到的第一件事是项目设置不是很直观地设置的:
The "$" in the Target's Architecture column should be switched to specify iOS Standard Architectures: “目标的体系结构”列中的“ $”应切换为指定iOS标准体系结构:
And at that point you should be able to build and run on the device. 到那时,您应该能够在该设备上构建和运行。 If you want to support the simulator as well, you'll need to add in "
i386
" as an architecture. 如果还想支持模拟器,则需要添加“
i386
”作为体系结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.