iphone sdk中的GoogleAdMobAds

ios*_*per 7 iphone google-adwords ios

我在我的项目中导入了libGoogleAdMobAds.a和Adsupport框架.和所有头文件.Linker标志为: - -0bjC.Architecture是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)
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我解决这个问题.

提前致谢

Raj*_*ngi 1

您必须采取两个步骤:

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