Ask Your Question

opencv ios issues

asked 2014-06-29 10:03:50 -0500

vismbr gravatar image


I'm having issues getting opencv running on my ios project.

I downloaded the latest opencv2.framework, tried to run some example code but got a ton of errors. So i tried to download a few examples from here: and still the same problem, like 40 errors like cannot find protocol, unknown type name.

Is there anything else that needs to be done than just importing the opencv2.framework to your project? Since i cant even get working examples running on either my phone or simulator.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-29 14:23:01 -0500

AGalluccio gravatar image

Hi, check that <projectName>.pch file is filled in this way:

#ifdef __cplusplus
#import <opencv2/opencv.hpp>

#import <Availability.h>

#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>


edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-06-29 10:03:50 -0500

Seen: 89 times

Last updated: Jun 29 '14