ios 在 IOS6 SDK 上编译最新版本的 admob 时不断收到错误消息
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12628249/
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
Keep getting error messages when compiling newest version of admob on IOS6 SDK
提问by ?ystein
I've downloaded the newest version of googles admob sdk. But now I keep getting the following error when compiling in xcode 4.5 with the latest sdk.
我已经下载了最新版本的 googles admob sdk。但是现在在使用最新的 sdk 在 xcode 4.5 中编译时,我不断收到以下错误。
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADIdentifierUtilities.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any idea on what could be wrong?
关于可能出什么问题的任何想法?
回答by Deor
You probably didn't add AdSupport.framework. Also remember to remove -all_load
linker flag.
您可能没有添加 AdSupport.framework。还记得删除-all_load
链接器标志。
回答by zszen
AdSupport.framework need in xcode 4.5 and admob 6.x
在 xcode 4.5 和 admob 6.x 中需要 AdSupport.framework
回答by mask
On the other way you can fix it without adding extra framework, remove the "-Obj" flag from "Linking > Other Linker Flags" if this flag is not required for your project.
另一方面,您可以在不添加额外框架的情况下修复它,如果您的项目不需要此标志,请从“链接 > 其他链接器标志”中删除“-Obj”标志。
I my case it was different, I had supported the GoogleConvertionTracking.lib but after couple of release customer decided to remove the GoogleConvertionTracking.lib from client. After removing all required code from client I started getting this error of ""_OBJC_CLASS_$_ASIdentifierManager", referenced from:"
我的情况有所不同,我支持 GoogleConvertionTracking.lib 但在发布几次后,客户决定从客户端删除 GoogleConvertionTracking.lib。从客户端删除所有必需的代码后,我开始收到 “_OBJC_CLASS_$_ASIdentifierManager”的错误,引用自:
After going thru the support doc of GoogleConvertionTracking I found that I had added "-Obj" compiler flag under Under Linking > Other Linker Flags.
会通GoogleConvertionTracking我的支持文档后发现,我已经下在链接>其它链接器标记添加“-Obj”编译器标志。
*by removing this "-Obj" flag from "Linking > Other Linker Flags" for both rel/deb this error is gone.
*通过从 rel/deb 的“链接 > 其他链接器标志”中删除这个“-Obj”标志,这个错误就消失了。
I don't have to add AddSupport.framework to get rid of this error. This change may be helpful for those who don't want to add extra framework to avoid the compilation error.
我不必添加 AddSupport.framework 来摆脱这个错误。此更改可能对那些不想添加额外框架以避免编译错误的人有所帮助。