2012-07-30 27 views
1

从SVN中拉出它时,我的iOS代码出现问题。我的代码在我的MAC上正常工作,但是在我将它上传到SVN并尝试构建我的项目后,它一遍又一遍地显示相同的错误。来自SVN的代码问题

Apple Mach-O Linker (id) error

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

这个问题很烦人,使我在代码上的工作非常困难。这里是完整的错误:

Ld /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer normal i386 cd "/Users/administrator/Desktop/test/Trade-In 4S" setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin" /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator "-L/Users/administrator/Desktop/test/Trade-In 4S" "-L/Users/administrator/Desktop/test/Trade-In 4S/Classes/ZBarSDK" "-L/Users/administrator/Desktop/test/Trade-In 4S/ZBarSDK" -F/Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator -filelist /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Intermediates/SmartDealer.build/Debug-iphonesimulator/SmartDealer.build/Objects-normal/i386/SmartDealer.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreData -lsqlite3 -framework QuartzCore -weak_framework CoreMedia -weak_framework CoreVideo -liconv -lzbar -weak_framework AVFoundation -o /Users/administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer

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

感谢您的帮助!

回答

0

您确定'ZBarSDK'文件夹已成功包含在SVN中吗?看起来你试图链接到该文件夹​​中的框架,所以你应该为框架找到一个标准化的位置,并将其安装在所有开发机器上,或者让你的项目独立,但要确保ZBarSDK文件夹已成功添加到您的SVN回购以及您的其他来源。

您可以从命令行 - 只需cd进入您的项目文件夹和svn add ZBarSDK

+0

非常感谢Andy。 ZBarSDK已上传,但有一个* .a文件丢失,SVN客户端忽略所有* .a文件。 我通过下载下面的插件解决了这个问题:SCPlugin(http://scplugin.tigris.org/)。有了这个插件,我可以手动添加文件。 – user1563193 2012-08-01 11:50:20