如何修复库错误?

时间:2011-03-28 05:56:58

标签: iphone xcode barcode

我在我的应用程序中使用条形码API,当我尝试在iphone上构建应用程序以进行测试时,它显示以下错误... “ 找不到-lbardecode的库 collect2:ld返回1退出状态 命令/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2失败,退出代码为1 “

2 个答案:

答案 0 :(得分:1)

您未在项目中包含barcode API相关library (framework)

已编辑:使用以下SO帖子找到您的解决方案..

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

答案 1 :(得分:0)

我解决了我的问题如下:

在“搜索路径”下,双击“库搜索路径”并添加以下内容:

$(SRCROOT)/libbardecode/Release$(EFFECTIVE_PLATFORM_NAME)

然后,这将与正确版本的libbardecode.a链接,无论您使用哪个目标。

相关问题