我正在尝试使用 Twitter 库,在添加 liboauth.a
并将 oauthconsumeriphonelib
添加到我的标头搜索路径后,我现在遇到了 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?
继续 Robin 的建议 您还需要设置库搜索路径.右键单击目标文件并选择 -- 获取信息,否则您也可以通过在 XCode 的项目选项卡下选择编辑动作目标来获得相同的信息.查找 Library Search Path 并添加此$(SRCROOT)/Twitter+OAuth/SAOAuthTwitterEngine" 其中 Twitter+OAuth/SAOAuthTwitterEngine 是项目文件夹中 Twitter Library 的目录路径.我希望这能解决问题.
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.
这篇关于XCode 编译器错误:ld:找不到 -loauth 的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!