XCode链接器错误:找不到-lAdMobDevice的库 [英] XCode linker error : library not found for -lAdMobDevice

查看:146
本文介绍了XCode链接器错误:找不到-lAdMobDevice的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用AdMob构建我的iPhone应用程序的精简版。我按照这里的指南 http:// www.iphonedevsdk.com/forum/iphone-sdk-development/11358-creating-lite-version-app.html 并创建了两个不同的目标。在Lite版本中,我添加了一个名为LITEVERSION的宏,我正在使用#ifdef进行检查并执行相应的操作。

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:找不到-lAdMobDevice的库
collect2:ld返回1退出状态

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

然而,我能够构建完整版本而没有任何问题,并且还注意到即使我删除了#ifdef宏,构建也能正常工作(对于完整版本)。这表明libAdMobSimulator.a库正在为完整版本正确链接,但它在lite版本上失败。

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!

干杯
Jugs

Cheers Jugs

推荐答案

当我遇到这个问题时,原因是我通过像普通的源文件一样拖动它将库添加到Xcode中。

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.

这篇关于XCode链接器错误:找不到-lAdMobDevice的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆