我已经克隆了https://github.com/niw/iphone_opencv_test并尝试替换
#import <opencv2/imgproc/imgproc_c.h>
#import <opencv2/objdetect/objdetect.hpp>
和
#import <opencv2/opencv.hpp>
在OpenCVTestViewController.m
文件中。但是 XCode 抛出了以下错误:
iphone_opencv_test/opencv_device/include/opencv2/opencv.hpp:55:10: fatal error: 'opencv2/calib3d/calib3d.hpp' file not found [2]
#include "opencv2/calib3d/calib3d.hpp"
所以,我试图#include "opencv2/calib3d/calib3d.hpp"
从opencv.hpp
文件中删除该行。抛出以下错误:
iphone_opencv_test/opencv_device/include/opencv2/ml/ml.hpp:2075:10: fatal error: 'map' file not found [2]
#include <map>
我也尝试将 .m 更改为 .mm,但这似乎是徒劳的。我哪里错了?