GooglePlus与CocoaPods链接错误 [英] GooglePlus with CocoaPods linking error
本文介绍了GooglePlus与CocoaPods链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我添加到我的pod文件
I added to my pod file
pod 'google-plus-ios-sdk', '1.4.1'
我做了
pod update
我已导入
#import <GooglePlus/GooglePlus.h>
但如果我尝试
[GPPSignIn sharedInstance].clientID = kClientID;
我从链接器收到此错误:
I get this error from linker:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_GPPSignIn", referenced from:
objc-class-ref in SDSocialManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
推荐答案
根据我的经验,链接器错误通常不会导致一个解决方案适合所有人,但我能够通过添加<自己解决这个问题在构建设置(项目目标)中code> $ {inherited} 到其他链接器标志
。
In my experience linker errors typically don't lead to a "one solution fits all", but I was able to solve this problem myself by adding ${inherited}
to Other Linker Flags
in Build Settings (Project Target).
也许,由于没有这个标签,我没有继承 GPPSignIn
。
Perhaps, by not having this tag, I wasn't inheriting some of the static libraries that were required by GPPSignIn
.
干杯!
这篇关于GooglePlus与CocoaPods链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文