0
私はプロジェクトを初期化して自分のココスゲームにバナーを追加しようとしています。私はすでにゲームを終了していますが、関数内で "adBanner"を使うたびに:didFinishLaunchingWithOptions:(NSDictionary *)launchOptionscocos2d-xプロジェクトでobjective-cとadmobを使用するときの問題
私はリンクの問題を抱えています。誰も助けることができますか?
[1]
エラー情報[ここに画像の説明を入力]:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GADBannerView", referenced from:
objc-class-ref in AppController.o
"_kGADAdSizeBanner", referenced from:
-[AppController application:didFinishLaunchingWithOptions:] in AppController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
コード:ビルド設定で
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
// Use RootViewController to manage CCEAGLView
_viewController = [[RootViewController alloc]init];
_viewController.wantsFullScreenLayout = YES;
// Set RootViewController to window
if ([[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
// warning: addSubView doesn't work on iOS6
[window addSubview: _viewController.view];
}
else
{
// use this method on ios6
[window setRootViewController:_viewController];
}
[window makeKeyAndVisible];
[[UIApplication sharedApplication] setStatusBarHidden:true];
//==============================banner================================
CGPoint origin = CGPointMake(0.0, _viewController.view.frame.size.height - kGADAdSizeBanner.size.height);
self.adBanner = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin];
self.adBanner.adUnitID = @"ca-app-pub-3940256099942544/2934735716";
//==============================banner================================
ありがとう、私はすでにそれを修正しました。 –
あなたの質問を修正してください(今後他の人に役立つでしょう) –