Error de OpenCV: el encabezado Core.hpp debe compilarse como C ++
Yo he tratadoCore.hpp, Base.hpp header must be compiled as C++
error. Tengo BITCODE configurado comoNO
.
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
@interface OpenCV : NSObject
/// Converts a full color image to grayscale image with using OpenCV.
+ (nonnull UIImage *)cvtColorBGR2GRAY:(nonnull UIImage *)image;
+ (cv::Mat)cvMatFromAdjustedUIImage:(UIImage *)image;
+ (cv::Mat)cvMatFromUIImage:(UIImage *)image;
+ (cv::Mat)cvMatGrayFromUIImage:(UIImage *)image;
+ (cv::Mat)cvMatGrayFromAdjustedUIImage:(UIImage *)image;
@end
En miOpenCVSample.mm
He incluido#import "OpenCV.h
en el encabezado