环境:XP+vs2010+opencv2.4.3
其中,我的opencv2.4.3安装目录为E:\Program Files\OpenCV\OpenCV2.4.3
下面直接上配置步骤~
1、设置环境变量:
在系统变量中增加path:E:\ProgramFiles\OpenCV\OpenCV2.4.3\opencv\build\x86\vc10\bin
2、vs2010中的设置,我建的是c++的emptyproject,名称为opencv_test
(1)菜单栏Project->properties
首先:设置VC++ Directories,包含目录如下:
设置Include Directories
E:\Program Files\OpenCV\OpenCV2.4.3\opencv\build\include
E:\ProgramFiles\OpenCV\OpenCV2.4.3\opencv\build\include\opencv
E:\ProgramFiles\OpenCV\OpenCV2.4.3\opencv\build\include\opencv2
设置Library Directories
E:\ProgramFiles\OpenCV\OpenCV2.4.3\opencv\build\x86\vc10\lib
然后:设置Linker->Input->AdditionalDependencies,如下:
opencv_calib3d243d.lib
opencv_contrib243d.lib
opencv_core243d.lib
opencv_features2d243d.lib
opencv_flann243d.lib
opencv_gpu243d.lib
opencv_highgui243d.lib
opencv_imgproc243d.lib
opencv_legacy243d.lib
opencv_ml243d.lib
opencv_objdetect243d.lib
opencv_ts243d.lib
opencv_video243d.lib
ok,配置完成,进行测试,测试代码如下:
#include "highgui.h"
int main(){
}
运行成功,vs2010已经能够调用opencv~