我使用的是最新版本的 opencv ( opencv 2.4.9 ),我必须有 -Objcflags,Core Plot需要em>(一个绘图框架)。
当我在其他标志中设置 -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
.
这是包含的框架的完整列表:
关于ios - opencv2.framework 无法使用链接器标志 -ObjC 进行编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23634940/