1

I am using z bar SDK in x code 5 when i am archiving its getting following errors

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)
Deepesh
  • 8,065
  • 3
  • 28
  • 45

3 Answers3

4

It seems you missed the one of the frameworks - Core Media.

Check the following integration link for ZBar sdk.
http://zbar.sourceforge.net/iphone/sdkdoc/install.html#integration

iNeal
  • 1,729
  • 15
  • 23
3

Remove armv7s arm64 Architectures only use the armv7 and solve your problem.

Project -> Build Settings -> Architectures -> Delete armv7s arm64

Deepesh
  • 8,065
  • 3
  • 28
  • 45
  • Worth noting is that you can specify for instance to run armv7 only for simulations but not for release which is important in my case. – Rickard Liljeberg Apr 07 '14 at 17:31
  • This solution is overkill. This error is almost always due to not linking against `CoreMedia.framework`, as @iNeal suggested. – Eric Sep 09 '14 at 21:55
0

Importing a header and do not linking against the correct library will cause that error. Check you have imported the correct libraries. A more complete answer can be found here

Undefined symbols for architecture armv7

Community
  • 1
  • 1
JSA986
  • 5,870
  • 9
  • 45
  • 91