Opencv_contrib: ios : Undefined symbols for architecture arm64,

Created on 7 Mar 2017  Â·  2Comments  Â·  Source: opencv/opencv_contrib

  • OpenCV => 3.2.0
  • Operating System / Platform => ios 5/6/7
  • Compiler => Xcode 8.2.1

Follow class and function are work normal:
cv::Mat cvImage; UIImageToMat(image, cvImage); cv::GaussianBlur Ptr<Tracker> tracker = Tracker::create("KCF"); ......

But follow is compile error:
VideoCapture cap("test.avi");

Error:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_AVAssetWriterInput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) "_AVMediaTypeVideo", referenced from: CvCaptureCAM::startCaptureDevice(int) in opencv2(cap_avfoundation.o) CvCaptureFile::CvCaptureFile(char const*) in opencv2(cap_avfoundation.o) CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(char const*, int, double, CvSize, int) in opencv2(cap_avfoundation.o) ......

Then I changed Architectures,but it prompt another Error:
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_AVAssetWriterInput", referenced from: objc-class-ref in opencv2(cap_avfoundation.o) "_AVMediaTypeVideo", referenced from: CvCaptureCAM::startCaptureDevice(int) in opencv2(cap_avfoundation.o) CvCaptureFile::CvCaptureFile(char const*) in opencv2(cap_avfoundation.o) CvVideoWriter_AVFoundation::CvVideoWriter_AVFoundation(char const*, int, double, CvSize, int) in opencv2(cap_avfoundation.o)

The package is download at https://sourceforge.net/projects/opencvlibrary/files/opencv-ios/3.2.0/opencv-3.2.0-ios-framework.zip/download.

builinstall

Most helpful comment

You need framework AVFoundation

All 2 comments

You need framework AVFoundation

@alalek Thanks,I added
AVFoundation.framework,
CoreMedia.framework,
AssetsLibrary.framework.

Was this page helpful?
0 / 5 - 0 ratings