2013-12-18 3 views
1

Zbar 바코드 스캐너 플러그인이 구현 될 때 PhoneGap 3.2.0 응용 프로그램이 Mac에서 컴파일되는 데 문제가 있습니다. 내가 장치에 배포하는 경우 그것은 엑스 코드 내에서 컴파일하지만, 시뮬레이션 장치로,이 오류를 제공합니다Zbar 바코드 스캐너가 PhoneGap에서 오류를 컴파일합니다

Ld DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP normal i386 cd /Users/Cordova/MyApp/platforms/ios setenv IPHONEOS_DEPLOYMENT_TARGET 5.0 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -L/Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator -L/Users/Cordova/MyApp/platforms/ios/ZBarSDK -L/Users/Cordova/MyApp/platforms/ios/MYAPP/Plugins/com.manateeworks.barcodescanner/MWBarcodeScanner -F/Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator -filelist /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Intermediates/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/libCordova.a -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.0 -framework AssetsLibrary -framework CoreGraphics -framework MobileCoreServices -framework CoreLocation -weak_framework ImageIO -framework CoreMotion -weak_framework AudioToolbox -weak_framework SystemConfiguration -framework Foundation -framework UIKit -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework QuartzCore -liconv -lzbar -Xlinker -dependency_info -Xlinker /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Intermediates/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/i386/MYAPP_dependency_info.dat -o /Users/Cordova/MyApp/platforms/ios/DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP

ld: warning: ignoring file /Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a, missing required architecture i386 in file /Users/Cordova/MyApp/platforms/ios/ZBarSDK/libzbar.a (3 slices) Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from: objc-class-ref in ZbarcodeScanner.o "_ZBarReaderControllerResults", referenced from: -[ZbarcodeScanner imagePickerController:didFinishPickingMediaWithInfo:] in ZbarcodeScanner.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

실제로 원하거나 시뮬레이션 장치를 필요로하지 않지만,

$ cordova build ios

이 오류를 던졌습니다 : 문제는 내가 명령을 실행할 때 터미널에서,이다

Error: An error occurred while building the ios project.

** BUILD FAILED **

The following build commands failed:

Ld build/emulator/MyApp.app/MyApp normal i386 

(1 failure)

내가 스스로 오류에 표시된 명령을 입력하려고하면, 알려줍니다 :

ld: file not found: build/emulator/MyApp.app/MyApp

사실입니다. 그것은 존재하지 않습니다. 나는 이것 이전에 뭔가 다른 것이 실패하고 그것이 만들어지기를 멈춘다 고 추정한다.

Zbar를 모두 제거하면 모든 것이 잘 작동합니다.

내가 만든 앱의 이전 버전은 PhoneGap v2.5.0에서 돌아 왔으며 명령 줄 인터페이스를 사용하여 빌드를 만들지 않았습니다. 나는 그것을 모두 수동으로 집어 넣었으므로이 문제는 나에게주지 않았다.

빌드 설정/빌드 단계 섹션에서 이미 많은 것을 시도해 보았습니다. 나는 2 주 동안이 일을 지금 해왔고, 내가 시도한 모든 것이 새로운 오류 메시지로 이어질 것으로 보인다. 도와주세요!

+1

LD 명령은 라이브러리 파일을 DerivedData/MYAPP/Build/Products/Debug-iphonesimulator/MYAPP.app/MYAPP 출력에 연결하려고 시도합니다. ZBar SDK가 컴파일되지 않았거나 링크가 실패하고 디렉토리가 생성되지 않도록 i386 아키텍처의 올바른 플래그. 적어도 명령/출력에서 ​​추측하고있는 것이므로 실제로 직접 시도 할 수는 없습니다. –

답변

0

나는 이것을 풀었다! 필자는 ZBar의 버전을 이전 버전으로 다운 그레이드했고 곧바로 작동했습니다. 분명히 ios7 픽스가있는 프로젝트의 일부 버전이 있습니다. 문제의 정확한 원인이 궁극적으로 무엇인지 확신 할 수 없습니다.

관련 문제