未定义标识符imread

出现未定义标识符这类问题,肯定是头文件的缺失

一开始我的头文件为下面这样,则报错

#include "cv.h"
#include "highgui.h"
using namespace cv;
using namespace std;

我在头文件加上下面的代码后,问题得到解决

#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>

我的运行环境是VS2015+OpenCV3.2.0

猜你喜欢

转载自blog.csdn.net/FJY_sunshine/article/details/85221756