2016-08-06 1 views
0

포드 종속성 'GoogleMap'이있는 프로젝트가 있습니다. 이제 ZbarSDK도 사용하고 싶습니다.포드를 사용할 때 .a 의존성 추가

ZBarSDK에는 내 프로젝트의 'LinkBinaryWithLibraries'섹션에 두 개의 .a 파일을 추가하고 라이브러리 헤더도 추가합니다.

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 파일을 검색 할 위치와 #import/#include 문의 .h 파일을 알려줍니다. 필요한 파일의 경로를 입력해야 할 수도 있습니다.

두 설정 중 하나의 팝업 창을 열면 Finder에서 Xcode 팝업으로 .a 또는 .h 파일이 들어있는 디렉토리를 각각 드래그 할 수 있어야합니다. 그러면 상대 경로가 파악됩니다 ${SRCROOT}과 같은 것을 사용합니다.

관련 문제