문제

I'm using the latest version of opencv (opencv 2.4.9) and I have to have the -ObjC flag, required by Core Plot (a plotting framework).

When I set -ObjC in the other flags, I get a lot of errors (28 actually) of type : Undefined symbols for architecture i386 as follow :

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

It is the same problem as Bartosz Bialecki, I tried the proposed solution but problem's still here.

Does anyone have an idea ?

EDIT :

Here are all the framework I included :

enter image description here

도움이 되었습니까?

해결책

Problem solved adding several frameworks : CoreVideo.framework, AssetsLibrary.framework, CoreMedia.framework.

Here is the complete list of the included frameworks : enter image description here

다른 팁

Below is the list frameworks you need to import into your project to build success. and here is the relate link

AVFoundation
opencv2

Accelerate

AssetsLibrary

CoreGraphics

CoreImage

CoreMedia

CoreVideo

QuartzCore

UIKit

Adding below frameworks worked for me

  • AVFoundation
  • CoreMedia
  • AssetLibrary
  • CoreVideo
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top