Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error when importing the iOS framework

Hello.

I downloaded the official version of iOS framework from the link on opencv.org.

I created a simple view-based XCODE project and added the opencv2.framework in the build phases menu.

Then I imported opencv2.framework as "#import <opencv2 opencv.hpp="">" in the *.pch file.

When I ran build, some error occurs like these:

/Users/wlee/Downloads/opencv2.framework/Versions/A/Headers/video/background_segm.hpp Unknown type name 'namespace' Expected ';' after top level declarator /Users/wlee/Downloads/opencv2.framework/Versions/A/Headers/objdetect/objdetect.hpp Unknown type name 'CvHaarFeature'

Did I do anything wrong ?

click to hide/show revision 2
No.2 Revision

Error when importing the iOS framework

Hello.

I downloaded the official version of iOS framework from the link on opencv.org.

I created a simple view-based XCODE project and added the opencv2.framework in the build phases menu.

Then I imported opencv2.framework as "#import <opencv2 opencv.hpp="">"

#import "opencv2/opencv.hpp"
in the *.pch file.

When I ran build, some error occurs like these:

/Users/wlee/Downloads/opencv2.framework/Versions/A/Headers/video/background_segm.hpp
Unknown type name 'namespace'
Expected ';' after top level declarator
/Users/wlee/Downloads/opencv2.framework/Versions/A/Headers/objdetect/objdetect.hpp
Unknown type name 'CvHaarFeature'

'CvHaarFeature'

Did I do anything wrong ?