我用的VS2013
一个项目要管的地方是:
项目-->右键属性-->{VC++目录-->包含目录和库目录,连接器-->输入-->附加依赖项}
包含目录与库目录在编辑是指导OpenCv相应地方就好了
也可以写成%opencv%开头的形式,前提是配置过环境变量。
附加依赖项里填写的内容如下
Debug:
opencv_core249.lib
opencv_imgproc249.lib
opencv_highgui249.lib
opencv_ml249.lib
opencv_video249.lib
opencv_features2d249.lib
opencv_calib3d249.lib
opencv_objdetect249.lib
opencv_contrib249.lib
opencv_legacy249.lib
opencv_flann249.lib
Release:
opencv_core249d.lib
opencv_imgproc249d.lib
opencv_highgui249d.lib
opencv_ml249d.lib
opencv_video249d.lib
opencv_features2d249d.lib
opencv_calib3d249d.lib
opencv_objdetect249d.lib
opencv_contrib249d.lib
opencv_legacy249d.lib
opencv_flann249d.lib
其中“249”是使用的OpenCV版本而定
原文地址:http://blog.csdn.net/xiaopangxia/article/details/44892189