编译cocos2d-x v3 IOS项目时出错,整合AdMob(IOS)框架

时间:2015-11-19 11:39:28

标签: c++ ios admob cocos2d-x-3.0 cocos2d-x-3.x

当我在Xcode中编译我的cocos2d-x V3项目时,它运行正常,但在包含AdMob框架时,它会显示以下链接器错误。

我已经包含" -ObjC" in"其他链接器" “构建设置”下的部分。

  

架构armv7的未定义符号:     " _kCMTimeZero",引自:          - GoogleMobileAds中的[GADVideoPlayer setAudioMixVolume:](GADVideoPlayer.o)     " _CMTimeMakeWithSeconds",引自:          - GoogleMobileAds中的[GADVideoPlayer seekToTime:](GADVideoPlayer.o)     " _CMTimeGetSeconds",引自:          - GoogleMobileAds中的[GADVideoPlayer notifyVideoPlayerWithTime:](GADVideoPlayer.o)          - GoogleMobileAds中的[GADVideoPlayer notifyVideoReadyToPlay](GADVideoPlayer.o)     " _CMTimeMake",引自:          - GoogleMobileAds中的[GADVideoPlayer observePlayer](GADVideoPlayer.o)     " _OBJC_CLASS _ $ _ EKEventEditViewController",引自:         GoogleMobileAds中的objc-class-ref(GADOpener.o)     " _OBJC_CLASS _ $ _ MFMailComposeViewController",引自:         GoogleMobileAds中的objc-class-ref(GADOpener.o)     " _SCNetworkReachabilityCreateWithAddress",引自:         GoogleMobileAds中的l001(GADGestureUtil.o)     " _OBJC_CLASS _ $ _ MFMessageComposeViewController",引自:         GoogleMobileAds中的objc-class-ref(GADDevice.o)         GoogleMobileAds中的objc-class-ref(GADOpener.o)     " _SCNetworkReachabilitySetCallback",引自:         ___ 35- [GADNetwork enableNetworkChecking] _block_invoke in GoogleMobileAds(GADNetwork.o)     " _SCNetworkReachabilityGetFlags",引自:         GoogleMobileAds中的l001(GADGestureUtil.o)     " _OBJC_CLASS _ $ _ EKEventStore",引自:         GoogleMobileAds中的objc-class-ref(GADSlot + MRAID.o)         GoogleMobileAds中的objc-class-ref(GADOpener.o)     " _SCNetworkReachabilitySetDispatchQueue",引自:         ___ 35- [GADNetwork enableNetworkChecking] _block_invoke in GoogleMobileAds(GADNetwork.o)         ___ 36- [GADNetwork disableNetworkChecking] _block_invoke in GoogleMobileAds(GADNetwork.o)     " _OBJC_CLASS _ $ _ EKEvent",引自:         GoogleMobileAds中的objc-class-ref(GADOpener.o)     " _OBJC_CLASS _ $ _ ASIdentifierManager",引自:         GoogleMobileAds中的objc-class-ref(GADDevice.o)         GoogleMobileAds中的objc-class-ref(GADInAppPurchaseTransactionReporter.o)         GoogleMobileAds中的objc-class-ref(GADGestureIdUtil.o)         GoogleMobileAds中的objc-class-ref(GADMAdURLAdapter.o)     " _SCNetworkReachabilityCreateWithName",引自:         ___ 35- [GADNetwork enableNetworkChecking] _block_invoke in GoogleMobileAds(GADNetwork.o)     " _OBJC_CLASS _ $ _ CTTelephonyNetworkInfo",引自:         GoogleMobileAds中的objc-class-ref(GADDevice.o)     " _CTRadioAccessTechnologyDidChangeNotification",引自:         ___ 48- [GADDevice enableRadioAccessTechnologyChecking] _block_invoke_2 in GoogleMobileAds(GADDevice.o)   ld:找不到架构armv7的符号   clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

1 个答案:

答案 0 :(得分:2)

啊!最后通过在我的项目中添加以下框架来解决它,在Xcode中的构建阶段下的 Link Binary With Libraries 部分。

  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreGraphics中
  • CoreMedia
  • CoreTelephony
  • EventKit
  • EventKitUI
  • MessageUI
  • StoreKit
  • SystemConfiguration