Undefined symbols for architecture armv7 when using ZXing library in Xcode 4.5

后端 未结 7 1116

What I am trying to do

Integrate Zxing, QR code reader framework, in my iPhone project. I checked out ZXing sdk from here. I ran the sample project coming with ZXi

7条回答
  •  抹茶落季
    2020-12-07 19:21

    I've followed all of the suggestions above, and while everything compiles fine, but still fail, the error message:

    Undefined symbols for architecture armv7:
    "_CVPixelBufferLockBaseAddress", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
    "_CVPixelBufferGetBytesPerRow", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
    "_CVPixelBufferGetWidth", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
    "_CVPixelBufferGetBaseAddress", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
    "_kCVPixelBufferPixelFormatTypeKey", referenced from:-[ZXingWidgetController initCapture] in libZXingWidget.a(ZXingWidgetController.o)
    "_CVPixelBufferGetHeight", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)
    "_CVPixelBufferUnlockBaseAddress", referenced from:-[ZXingWidgetController captureOutput:didOutputSampleBuffer:fromConnection:] in libZXingWidget.a(ZXingWidgetController.o)ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    so, you add CoreVideo.framework, the compile will be ok.

提交回复
热议问题