1

从 SVN 中提取 iOS 代码时,我遇到了问题。我的代码在我的 MAC 上运行良好,但是在我将其上传到 SVN 并尝试构建我的项目后,它一遍又一遍地显示相同的错误。

Apple Mach-O 链接器 (id) 错误

ld:找不到 -lzbar 命令的库 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang 失败,退出代码为 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 -在 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 -oUser /administrator/Library/Developer/Xcode/DerivedData/SmartDealer-hezswmtfdvujkibrhkmqudlypdqk/Build/Products/Debug-iphonesimulator/SmartDealer.app/SmartDealer

ld:找不到 -lzbar 命令的库 /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang 失败,退出代码为 1

谢谢你的帮助!

4

1 回答 1

0

您确定“ZBarSDK”文件夹已成功包含在 SVN 中吗?您似乎正在尝试链接到该文件夹​​中的框架,因此您应该找到框架的标准化位置并将其安装在所有开发机器上,或者不理会您的项目,但确保 ZBarSDK 文件夹已成功添加到您的 SVN 存储库以及您的其他来源。

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

于 2012-07-30T14:35:37.140 回答