ios - opencv2.framework 无法使用链接器标志 -ObjC 进行编译

标签 ios objective-c xcode opencv linker-flags

我使用的是最新版本的 opencv ( opencv 2.4.9 ),我必须有 -ObjcflagsCore Plot(一个绘图框架)。

当我在其他标志中设置 -ObjC 时,我得到了很多类型的错误(实际上是 28 个):Undefined symbols for architecture i386如下:

Undefined symbols for architecture i386:
"_CMSampleBufferGetImageBuffer", referenced from:
-[CaptureDelegate captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_avfoundation.o)
CvCaptureFile::retrieveFramePixelBuffer() in opencv2(cap_avfoundation.o)
-[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
"_CMSampleBufferGetPresentationTimeStamp", referenced from:
-[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)
"_CMSampleBufferInvalidate", referenced from:
CvCaptureFile::retrieveFramePixelBuffer() in opencv2(cap_avfoundation.o)
"_CMTimeMake", referenced from:
CvCaptureCAM::startCaptureDevice(int) in opencv2(cap_avfoundation.o)
CvVideoWriter_AVFoundation::writeFrame(_IplImage const*) in opencv2(cap_avfoundation.o)
-[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o)
"_CMVideoFormatDescriptionGetPresentationDimensions", referenced from:
CvCaptureCAM::getProperty(int) in opencv2(cap_avfoundation.o)
"_CVBufferRelease", referenced from:
-[CaptureDelegate captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_avfoundation.o)
-[CaptureDelegate updateImage] in opencv2(cap_avfoundation.o)
CvCaptureFile::retrieveFramePixelBuffer() in opencv2(cap_avfoundation.o)
... etc

这与Bartosz Bialecki 是同一个问题,我尝试了建议的解决方案,但问题仍然存在。

有没有人有想法?

编辑:

这是我包含的所有框架:

enter image description here

最佳答案

问题解决了添加几个框架: CoreVideo.framework, AssetsLibrary.framework, CoreMedia.framework.

这是包含的框架的完整列表: enter image description here

关于ios - opencv2.framework 无法使用链接器标志 -ObjC 进行编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23634940/

相关文章:

objective-c - OS X 上的 CATiledLayers

iphone - SQLite3-选择日期范围不起作用

ios - 无法将 xcassets 分配给 Xcode 11 上的主要目标

ios - 在 xCode 6/7 中更改代码完成样式?

iphone - 如何多次发送相同的 Twitter 消息?

ios - 更改 UISlider 的背景图像?

Objective-C:Getter 不应该用于副作用编译器警告

xcode - 如何在 Xcode 8 中创建删除行键盘快捷键? Xcode 3 解决方案不再起作用

iOS8.2 不播放来自 parse.com 应用程序的自定义警报声音

ios - 如何将日期存储到解析数据库(iOS)