Ask Your Question

Revision history [back]

OpenCV 2.4.3 iOS CvVideoCamera throws build errors

When I try to compile in Xcode I get the following error:

"_objc_setProperty_nonatomic", referenced from: -[CvVideoCamera setCustomPreviewLayer:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera setVideoDataOutput:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera setRecordAssetWriterInput:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera setRecordPixelBufferAdaptor:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera setRecordAssetWriter:] in opencv2(cap_ios_video_camera.o) -[CvAbstractCamera setDefaultAVCaptureSessionPreset:] in opencv2(cap_ios_abstract_camera.o) -[CvAbstractCamera setCaptureSession:] in opencv2(cap_ios_abstract_camera.o) ... ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Compiler is set to libc++, all source files are named .mm (and I also forced xcode to compile it as obj-c++). I'm importing the headers properly, but it is still throwing this linker error. I downloaded the latest OpenCV framework (2.4.3) and everything works fine until I try throwing the CvVideoCamera in there and then it goes all haywire.

Any ideas/suggestions?