gpt4 book ai didi

iphone - iphone sdk 中的 GoogleAdMobAds

转载 作者:可可西里 更新时间:2023-11-01 03:33:10 25 4
gpt4 key购买 nike

我在我的项目中导入了 libGoogleAdMobAds.a 和 Adsupport 框架。和所有头文件。链接器标志为:- -0bjC。体系结构是 armv7。Xcode:- 4.5.2 和 ios 4.3 及更高版本。

但它仍然给我以下错误:-

Undefined symbols for architecture i386:
"_CGSizeFromGADAdSize", referenced from:
-[BannerExampleViewController viewDidLoad] in BannerExampleViewController.o
"_OBJC_CLASS_$_GADBannerView", referenced from:
objc-class-ref in BannerExampleViewController.o
"_OBJC_CLASS_$_GADRequest", referenced from:
objc-class-ref in BannerExampleViewController.o
"_kGADAdSizeBanner", referenced from:
-[BannerExampleViewController viewDidLoad] in BannerExampleViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

谁能帮我解决这个问题。

提前致谢

最佳答案

您必须执行两个步骤:

  1. 在build设置中,选择链接。在这里,您会找到“其他链接器标志”。为构建和发布设置 -Objc。
  2. 您将使用定义的矩形初始化 Admob。考虑:AbMod = [GADBannerView alloc]initWithFrame:CGRectMake(0,430,320,50)];

关于iphone - iphone sdk 中的 GoogleAdMobAds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15113119/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com