2016-08-06 237 views
0

我有一個具有pod依賴項'GoogleMap'的項目。現在我也想使用ZbarSDK。當您使用pod時添加.a依賴關係

ZBarSDK有兩個.a文件,我將它們添加到我的項目的'LinkBinaryWithLibraries'部分,並且還添加了庫標頭。但我仍然收到以下錯誤時想運行該應用程序:

Ld /Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Products/Debug-iphoneos/APMB.app/APMB normal armv7 
    cd "/Users/rad/Documents/GIT Repo/iOS-APMB" 
    export IPHONEOS_DEPLOYMENT_TARGET=7.0 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Products/Debug-iphoneos -F/Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Products/Debug-iphoneos -F/Users/rad/Documents/GIT\ Repo/iOS-APMB/Pods/GoogleMaps/Frameworks -filelist /Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Intermediates/APMB.build/Debug-iphoneos/APMB.build/Objects-normal/armv7/APMB.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=7.0 -dead_strip -Xlinker -no_deduplicate -fembed-bitcode-marker -ObjC -lc++ -licucore -lz -framework AVFoundation -framework Accelerate -framework CoreBluetooth -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreText -framework GLKit -framework GoogleMaps -framework ImageIO -framework OpenGLES -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a -Xlinker -add_ast_path -Xlinker /Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Intermediates/APMB.build/Debug-iphoneos/APMB.build/Objects-normal/armv7/APMB.swiftmodule -lPods -lzbar -lzbar-sim -Xlinker -dependency_info -Xlinker /Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Intermediates/APMB.build/Debug-iphoneos/APMB.build/Objects-normal/armv7/APMB_dependency_info.dat -o /Users/rad/Library/Developer/Xcode/DerivedData/APMB-fbbvbbebzyjbwgaaoqaanlaiftor/Build/Products/Debug-iphoneos/APMB.app/APMB 

ld: library not found for -lzbar 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

有人知道是什麼問題?

回答

1

嘗試檢查您的HEADER_SEARCH_PATHLIBRARY_SEARCH_PATH構建設置。這些告訴鏈接器在哪裏搜索您的.a文件和.h文件以查找您的#import/#include語句。您可能需要輸入必要文件的路徑。

如果您打開任一設置的彈出窗口,您應該能夠將分別包含.a或.h文件的目錄從Finder拖動到Xcode彈出窗口中,並且會爲您找出相對路徑使用類似${SRCROOT}

相關問題