1

当我归档它出现以下错误时,我在 x 代码 5 中使用 z bar SDK

Undefined symbols for architecture armv7:
  "_CMSampleBufferGetImageBuffer", referenced from:
      -[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
  "_CMSampleBufferIsValid", referenced from:
      -[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
  "_CMSampleBufferDataIsReady", referenced from:
      -[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
  "_CMSampleBufferGetNumSamples", referenced from:
      -[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in libzbar.a(ZBarCaptureReader.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4

3 回答 3

4

看来您错过了其中一个框架 - Core Media.

检查 ZBar sdk 的以下集成链接。
http://zbar.sourceforge.net/iphone/sdkdoc/install.html#integration

于 2013-11-19T11:00:31.953 回答
3

删除armv7s arm64 架构只使用armv7并解决您的问题。

项目 -> 构建设置 -> 架构 -> 删除 armv7s arm64

于 2013-11-13T07:38:23.870 回答
0

导入标头而不链接正确的库将导致该错误。检查您是否导入了正确的库。可以在这里找到更完整的答案

架构 armv7 的未定义符号

于 2013-11-07T10:31:49.693 回答