AVFoundation函数在arm6 / arm7中未定义

时间:2011-03-30 15:31:41

标签: iphone linker ios4 avfoundation

我正在尝试使用此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

1 个答案:

答案 0 :(得分:36)

添加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