[英]opencv2.framework not compile with linker flag -ObjC
我正在使用最新版本的opencv ( opencv 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.framework
, AssetsLibrary.framework
, CoreMedia.framework
。
这是所包含框架的完整列表:
以下是您需要导入到项目中以建立成功的列表框架。 这是相关链接
AVFoundation
opencv2
Accelerate
AssetsLibrary
CoreGraphics
CoreImage
CoreMedia
CoreVideo
QuartzCore
UIKit
添加以下框架对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.