Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode linker error : library not found for -lAdMobDevice

I am trying to build lite version of my iPhone application using AdMob. I followed the guidelines here http://www.iphonedevsdk.com/forum/iphone-sdk-development/11358-creating-lite-version-app.html and created two different targets. In the lite version I added a macro called LITEVERSION which I am checking using #ifdef and doing the appropriate things.

But when I build the lite version of the app, I get a linker error

ld: library not found for -lAdMobDevice collect2: ld returned 1 exit status

However I am able to build the full version without any issues and also noticed that build is working fine (for the fullversion) even if I remove the #ifdef macros. This suggests that the libAdMobSimulator.a library is linking properly for the full version however it fails on the lite version.

Any pointers would be greatly appreciated!

Cheers Jugs

like image 300
Jugs Avatar asked Sep 24 '09 14:09

Jugs


People also ask

Where are build settings in xCode?

Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.


1 Answers

When I had this problem, the cause was that I'd added the library into Xcode by dragging it in like a regular source file.

The fix was to remove it, and then add it properly using the "Add->Existing Frameworks..." dialogue.

like image 160
Kris Jenkins Avatar answered Oct 20 '22 10:10

Kris Jenkins