其中D:\openCV2.4.3\opencv\是我OpenCV安装的home目录,也可以先设置OPENCV_HOME的环境变量名,其值为D:\openCV2.4.3\opencv\,然后在path中添加%OPENCV_HOME%build\x86\vc10\bin
VS2010-【视图】-【其他窗口】-【属性管理器】
Debug | Win32右键属性,在其中设置
(若在vs2008中,对应设置为:工具-选项-项目和解决方案-VC++目录,选包含文件和库文件)
(若在vs2008中,对应设置为:C/C++ -附加包含文件(目录))
(若在vs2008,对应设置为:链接器-常规-附加库目录)
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 opencv_contrib243.lib opencv_core243.lib opencv_features2d243.lib opencv_flann243.lib opencv_gpu243.lib opencv_highgui243.lib opencv_imgproc243.lib opencv_legacy243d.lib opencv_ml243.lib opencv_objdetect243.lib opencv_ts243.lib opencv_video243.lib opencv_calib3d243.lib opencv_haartraining_engine.lib opencv_nonfree243.lib opencv_photo243.lib opencv_stitching243.lib opencv_videostab243.lib opencv_calib3d243d.lib opencv_haartraining_engined.lib opencv_nonfree243d.lib opencv_photo243d.lib opencv_stitching243d.lib opencv_videostab243d.lib
NOTE THAT:上面的依赖项名字后面都带着243,因为我安装的OpenCV版本号是2.4.3,如果是别的版本,则依赖项后面的数字就对应其相应版本,比如若是OpenCV2.4.6,则对应的数字是246,其中带d的表示debug的依赖项,不带d的表示release的依赖项。