簡體   English   中英

使用Pod時添加.a依賴項

[英]Add .a dependency when you are using pod

我有一個具有pod依賴項“ GoogleMap”的項目。 現在我也想使用ZbarSDK。

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)

有人知道這是什么問題嗎?

嘗試檢查您的HEADER_SEARCH_PATHLIBRARY_SEARCH_PATH構建設置。 那些告訴鏈接到哪里搜索.a文件,和.h文件為您#import / #include語句。 您可能需要輸入必要文件的路徑。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM