1

iOS コードを SVN からプルするときに問題が発生しました。私のコードは 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 通常の 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 -o /Users /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 に答える