我嘗試添加的AdMob使用的Xcode 5.1的iOS到的Cocos2D-X 3.2簡單的遊戲
7.1
我按照 https://developers.google.com/mobile-ads-sdk/docs/#ios
和 http://plaincode.blogspot.co.il/2014/02/example-of-admob-integration-in-cocos2d.html鏈接錯誤添加AdMob,在IOS時的Cocos2D-X 3.2
,並在「其它鏈接器標記」
我收到鏈接錯誤添加-ObjC後旗:
Undefined symbols for architecture armv7s:
"_GCControllerDidDisconnectNotification", referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o)
"_GCControllerDidConnectNotification", referenced from:
-[GCControllerConnectionEventHandler observerConnection:disconnection:] in libcocos2dx iOS.a(CCController-iOS.o)
"_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
objc-class-ref in libcocos2dx iOS.a(UIVideoPlayerIOS.o)
"_OBJC_CLASS_$_GCController", referenced from:
objc-class-ref in libcocos2dx iOS.a(CCController-iOS.o)
(maybe you meant: _OBJC_CLASS_$_GCControllerConnectionEventHandler)
"_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from:
-[UIVideoViewWrapperIos dealloc] in libcocos2dx iOS.a(UIVideoPlayerIOS.o)
-[UIVideoViewWrapperIos setURL::] in libcocos2dx iOS.a(UIVideoPlayerIOS.o)
"_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
-[UIVideoViewWrapperIos dealloc] in libcocos2dx iOS.a(UIVideoPlayerIOS.o)
-[UIVideoViewWrapperIos setURL::] in libcocos2dx iOS.a(UIVideoPlayerIOS.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
當我取出-ObjC標誌 然後我得到:
<Google> Category methods are not loaded. Make sure you link the Google Mobile Ads library using one of the -ObjC, -force_load, or -all_load linker flags. See https://developers.google.com/mobile-ads-sdk/docs/#ios for more information.
這裏有什麼問題?
我會建議使用plugin-x – aviran
你是什麼意思,有沒有任何現成的插件爲admob iOS? – user63898
是的,它被稱爲plugin-x,它帶有cocos2d-x,google它。 – aviran