1下载openCV,
https://sourceforge.net/projects/opencvlibrary/files/opencv-win/
参考官网https://docs.opencv.org/master/d3/d52/tutorial_windows_install.html
本次以2.4.10为例,解压到D:\opencv2.4.10
2配置环境变量
D:\opencv2.4.10\build\x86\vc11
对应关系如图
3包含路径设置
视图-〉属性管理器-〉debug处右键属性-〉通用属性-〉vc++目录-〉包含目录
添加
D:\Program Files\opencv\build\include
D:\Program Files\opencv\build\include\opencv
D:\Program Files\opencv\build\include\opencv2 这三个目录。