Ask Your Question
0

opencv ios issues

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

vismbr gravatar image

hi!

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: https://github.com/Itseez/opencv_for_ios_book_samples 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
0

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

AGalluccio gravatar image

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

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

#import <Availability.h>

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

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

Andrea

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 226 times

Last updated: Jun 29 '14