14
votes

I'm trying to convert an image using this http://developer.apple.com/library/ios/#qa/qa1702/_index.html

I don't know if it's because i'm using xcode4 or because some other issue. I'm trying to code for the IOS4. And can't compile it, because the linker complains the functions don't exist. But here they are in the documentation: http://developer.apple.com/library/ios/#documentation/QuartzCore/Reference/CVPixelBufferRef/Reference/reference.html#//apple_ref/doc/uid/TP40010033

Any help would be great

Undefined symbols for architecture armv6:
  "_CVPixelBufferGetHeight", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetWidth", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CMSampleBufferGetImageBuffer", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferLockBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetBytesPerRow", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferUnlockBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
1
I installed xcode4 yesterday before starting this, so really don't know if the problem comes from there. - fmsf
I have AVFoundation.framework on the frameworks btw - fmsf

1 Answers

36
votes

Adding ImageIO.framework and CoreVideo.framework fixed:

  "_CVPixelBufferGetHeight", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetWidth", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferLockBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferGetBytesPerRow", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o
  "_CVPixelBufferUnlockBaseAddress", referenced from:
      -[CameraController imageFromSampleBuffer:] in CameraController.o

When i find wich one links to the this one i'll edit this answer:

Edit: adding CoreMedia.framework fixed the last one:

  "_CMSampleBufferGetImageBuffer", referenced from:
   -[CameraController imageFromSampleBuffer:] in CameraController.o

The result of this project is now available :) http://itunes.apple.com/us/app/live-video-puzzle/id430481367?mt=8