xcode 架构 armv7、ld 的未定义符号:找不到架构 armv7 的符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34960517/
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
Undefined symbols for architecture armv7, ld: symbol(s) not found for architecture armv7
提问by sagar varsani
I am implementing google cloud messaging in my project, and i have setup cocoapods in my project. But when I run the project it generate error, this error is Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SKProductsRequest", referenced from: objc-class-ref in libGGLCore.a(GMRProductsRequest.o) "_OBJC_CLASS_$_SKPaymentQueue", referenced from: objc-class-ref in libGGLCore.a(GMRInAppPurchaseTransactionReporter.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation). I am using Xcode 7 and swift 2 and my pod version is 1.0.0.beta.2
我正在我的项目中实现谷歌云消息传递,并且我在我的项目中设置了 cocoapods。但是当我运行这个项目时它会产生错误,这个错误是 架构 armv7 的未定义符号:“_OBJC_CLASS_$_SKProductsRequest”,引用自:libGGLCore.a(GMRProductsRequest.o)“_OBJC_CLASS_$_SKPaymentQueue”中的 objc-class-ref,引用自:libGGLCore.a(GMRInAppPurchaseTransactionReporter.o) 中的objc-class-ref ld:找不到架构armv7 clang 的符号:错误:链接器命令失败,退出代码为1(使用-v 查看调用)。我正在使用 Xcode 7 和 swift 2,我的 pod 版本是 1.0.0.beta.2
Please help me, I am not able to solve this issue.
请帮助我,我无法解决这个问题。
回答by MikeG
Read this post... After update to Xcode 5 - ld: symbol(s) not found for architecture armv7 or armv7s linker error
阅读这篇文章...更新到 Xcode 5 后 - ld: 找不到架构 armv7 或 armv7s 链接器错误的符号
Basically you need to remove Build Active Architecture Onlyfrom all your static libraries' project build settings. Xcode added this with their update as it makes Xcode compile faster since it only requires Xcode to compile for the connected device, but it is causing problems in your case so you may remove it
基本上,您需要从所有静态库的项目构建设置中删除Build Active Architecture Only。Xcode 在他们的更新中添加了这一点,因为它使 Xcode 编译速度更快,因为它只需要 Xcode 为连接的设备编译,但它在您的情况下会导致问题,因此您可以将其删除
回答by sagar varsani
I have add GameKit.framework and StoreKit.framework into Target>>General>>Linked Frameworks and Libraries.
我已将 GameKit.framework 和 StoreKit.framework 添加到 Target>>General>>Linked Frameworks and Libraries 中。
clean project and build project.An error is solved
清理项目并构建项目。错误已解决