我正在尝试使用此http://developer.apple.com/library/ios/#qa/qa1702/_index.html转换图像

我不知道这是因为我使用的是xcode4还是因为其他问题。我正在尝试为IOS4编写代码。并且无法编译它,因为链接器抱怨该函数不存在。但是它们在文档中:http://developer.apple.com/library/ios/#documentation/QuartzCore/Reference/CVPixelBufferRef/Reference/reference.html#//apple_ref/doc/uid/TP40010033

任何帮助都会很棒

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

最佳答案

修复了添加ImageIO.framework和CoreVideo.framework的问题:

  "_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




当我找到与该链接的链接时,我将编辑此答案:

编辑:添加CoreMedia.framework修复了最后一个:

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


该项目的结果现在可用:)
http://itunes.apple.com/us/app/live-video-puzzle/id430481367?mt=8

关于iphone - 在arm6/arm7中未定义的AVFoundation函数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5488513/

10-15 04:51