如何为OAuth添加库

时间:2011-06-10 09:42:17

标签: iphone

我正面临这个错误,可能是造成错误的原因

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

感谢您的帮助。

3 个答案:

答案 0 :(得分:3)

如果您使用的是twitter + oAuth,那么您需要在项目中拖动libOAuth.a lib,而不是那个。

您可以在示例代码文件夹中找到libOAuth.a

答案 1 :(得分:0)

当您使用两个具有相同名称的文件,或者使用两个相同的变量名称到两个不同的.m文件时,会发生此错误。所以检查一下。

答案 2 :(得分:0)

当您错过一个或多个文件时,您将收到此错误。检查丢失的文件。