2012-07-30 26 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