繁体   English   中英

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

[英]opencv2.framework not compile with linker flag -ObjC

我正在使用最新版本的opencvopencv 2.4.9 ),并且必须具有Core Plot (绘图框架)所需的-ObjC标志

当我在其他标志中设置-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相同的问题,我尝试了提出的解决方案,但问题仍然存在。

有人有主意吗?

编辑:

这是我包括的所有框架:

在此处输入图片说明

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

这是所包含框架的完整列表: 在此处输入图片说明

以下是您需要导入到项目中以建立成功的列表框架。 这是相关链接

AVFoundation
opencv2

Accelerate

AssetsLibrary

CoreGraphics

CoreImage

CoreMedia

CoreVideo

QuartzCore

UIKit

添加以下框架对我有用

  • AVFoundation
  • 核心媒体
  • 资产库
  • 核心视频

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM