XCode 编译器错误:ld:找不到 -loauth 的库

发布于 2024-10-16 03:31:11 字数 323 浏览 3 评论 0原文

我正在尝试使用 Twitter 库,在添加 liboauth.a 并将 oauthconsumeriphonelib 添加到我的标头搜索路径后,我现在已减少到 1 个编译错误,这是我的错误似乎无法摆脱。

ld: library not found for -loauth
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

有谁知道这可能是什么原因造成的?

I'm trying to use the Twitter libraries and after adding liboauth.a and adding oauthconsumeriphonelib to my header search path, I'm now down to 1 compilation error, which I can't seem to get rid of.

ld: library not found for -loauth
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Anyone know what could be causing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

欲拥i 2024-10-23 03:31:11

继续罗宾的建议 您还需要设置库搜索路径。右键单击目标文件并选择 -- 获取信息,否则您也可以通过在 XCode 中的“项目”选项卡下选择“编辑 Actice Target”来获得相同的信息。查找库搜索路径并添加此“$(SRCROOT)/Twitter+OAuth/SAOAuthTwitterEngine”,其中 Twitter+OAuth/SAOAuthTwitterEngine 是项目文件夹中 Twitter 库的目录路径。
我希望这能解决这个问题。


在此处输入图像描述

Continuing to What Robin suggested You also need to set the Library Search Path. Right Click the Target File and Choose -- Get Info else you can also get the same by choosing Edit Actice Target Under the Project Tab in XCode. Look for Library Search Path and add this "$(SRCROOT)/Twitter+OAuth/SAOAuthTwitterEngine" Where Twitter+OAuth/SAOAuthTwitterEngine is the directory path for Twitter Library in project folder.
I hope this will fix the problem.


enter image description here

美男兮 2024-10-23 03:31:11

@Nefsu,您需要通过添加现有框架然后给出您想要使用的库的路径来将这些库添加到您的项目中。

如果您已经通过拖放添加了库,则不要删除它们,只需右键单击组和文件夹来添加现有框架,然后从文件夹中添加库即可完成

Well @Nefsu you need to add those libraries to your project by adding an existing framework and then giving the path of the libraries you want to use.

And if you have already added the libraries by drag and drop, than dont remove them just add existing framework by right clicking on groups and folders and add the libraries from the folder and you will be done

心碎无痕… 2024-10-23 03:31:11

我在尝试升级到新的 Google Analytics 库时发现了这条极具误导性的消息。

就我而言,问题在于该库有两个冲突的副本。它们位于不同的文件夹中,但都列在我的应用程序的库构建路径中(在“构建设置”下)。

将所有已弃用的库文件移出文件夹最终达到了目的,并使神秘的错误消息消失。

I discovered this HIGHLY misleading message while trying to upgrade to the new Google Analytics library.

In my case the problem was having TWO CONFLICTING COPIES of the library. They were in different folders but both were listed in my App's Library Build Paths (under Build Settings).

Moving all the deprecated library files out of the folder ended up doing the trick and made the mysterious error messages go away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文