views:

606

answers:

2

Hey Guys,

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

A: 

I figured out what he problem was. I just removed all frameworks and libraries and added them back in for both the targets and it worked!

Cheers

Jugs
+3  A: 

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.

Kris Jenkins
This answer is correct
davbryn