arm6/arm7 中未定义的 AVFoundation 函数

Posted

技术标签:

【中文标题】arm6/arm7 中未定义的 AVFoundation 函数【英文标题】:AVFoundation functions undefined in arm6/arm7 【发布时间】:2011-03-30 15:31:41 【问题描述】:

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

【问题讨论】:

我昨天在开始这个之前安装了xcode4,所以真的不知道问题是否来自那里。 我在框架上有 AVFoundation.framework 顺便说一句 【参考方案1】:

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

【讨论】:

谢谢 - Apple 的文档懒得提在处理 IMAGES 时需要导入 VIDEO 框架,这真的很烦人。这远非显而易见!

以上是关于arm6/arm7 中未定义的 AVFoundation 函数的主要内容,如果未能解决你的问题,请参考以下文章

扑动中未定义的类'UserCredential'

为啥子组件中未定义上下文?

数组中未定义的值

libboost 中未定义的符号

函数“重定向”中未定义的名称

为啥我的变量在 useEffect 中定义的其他地方在反应中未定义?