Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Admob Linker Error

Tags:

linker

admob

I'm implementing Admob to my iphone app. It works in the simulator at iOS 4.0 (with target SDK 3.0), which shows I've correctly followed the beginners tutorial at http://code.google.com/mobile/ads/docs/ios/fundamentals.html. However when trying to run on a device which has iOS 4.3.1 I get 2 linker errors:

ld: warning: ignoring file /Users/home/Documents/iPhoneDocs/Admobs/googleadmobadssdkios/GoogleAdMobAdsSDK/libGoogleAdMobAds.a, file was built for unsupported file format which is not the architecture being linked (armv7) Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GADRequest", referenced from: objc-class-ref in RootViewController.o "_OBJC_CLASS_$_GADBannerView", referenced from: objc-class-ref in RootViewController.o ld: symbol(s) not found for architecture armv7 collect2: ld returned 1 exit status

What does this mean and how do I fix it? One thing I don't understand is that the file it's referencing is valid, but I was expecting it to reference the one in my project directory.

like image 700
Tom Veitch Avatar asked Dec 01 '22 02:12

Tom Veitch


1 Answers

You need to add libGoogleAdMobAds.a to framework. Drag libGoogleAdMobAds.a to Link Binary With Libraries. Check following image

http://code.google.com/mobile/ads/images/frameworks2.png

like image 155
saturngod Avatar answered Dec 09 '22 09:12

saturngod