Apple Mach-O Librarian Error when include AdMob SDK

Hi,

When I followed google AdMob instruction, and finish all required steps.
when compile my project, i got following error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can’t locate file for: -lwebp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lwebp is not an object file (not allowed in a library)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

error:

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

have searched for whole night and couldn’t solve this problem. Any ideas?

anyone to help?

ok… Finally i solved the problem.

Now I have included admob and added following code to rootviewcontroller:

#import <UIKit/UIKit.h>
#import “GADBannerView.h”

@interface RootViewController : UIViewController {

GADBannerView *bannerView_;

}

@end

  • (void)viewDidLoad {
    [super viewDidLoad];

    // Create a view of the standard size at the top of the screen.
    // Available AdSize constants are explained in GADAdSize.h.
    // Create a view of the standard size.
    bannerView_ = [[GADBannerView alloc]
    initWithFrame:CGRectMake(0,366,320,50)];

    // Specify the ad unit ID.
    bannerView_.adUnitID = @“ca-app-pub-4106+hidemyid+sorry”;

    // Let the runtime know which UIViewController to restore after taking
    // the user wherever the ad goes and add it to the view hierarchy.
    bannerView_.rootViewController = self;
    [self.view addSubview:bannerView_];

    // Initiate a generic request to load it with an ad.
    [bannerView_ loadRequest:[GADRequest request]];
    }

when I run my project, I didn’t see the banner.

I am using cocos2d-x javascript to code.

do I have to call the API in my scene javascript files? if so, how to call it?

anyone kindly advise why does this happen?