http://blog.csdn.net/xiaohanstu/article/details/45309149?utm_source=tuicool
<pre name="code" class="cpp">vs2012 opencv2.4.7配置 1、配置 (1)、在“视图”中打开“属性管理器”; (2)、在“属性管理器”中双击Demo的项目名称; (3)、在“Demo属性页”->“VC++目录”->“包含目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:opencv247opencvuildinclude ;D:opencv247opencvuildincludeopencv ;D:opencv247opencvuildincludeopencv2 2、在“Demo属性页”->“VC++目录”->“库目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:opencv247opencvuildx86vc11lib 3、在“Demo属性页”(“配置”==“Debug”)->“配置属性”->“链接器”->“输入”->“附加依赖库”中追加下面一行(包括所有分号,勿删VS原始数据): ;opencv_core247d.lib ;opencv_highgui247d.lib ;opencv_video247d.lib ;opencv_ml247d.lib ;opencv_legacy247d.lib ;opencv_imgproc247d.lib 4、在“Demo属性页”(“配置”==“Release”)->“配置属性”->“链接器”->“输入”->“附加依赖库”中追加下面一行(包括所有分号,勿删VS原始数据): ;opencv_core247.lib ;opencv_highgui247.lib ;opencv_video247.lib ;opencv_ml247.lib ;opencv_legacy247.lib ;opencv_imgproc247.lib 5 环境变量设置 ;D:opencv247opencvuildx64vc11in //针对64位系统 ;D:opencv247opencvuildx86vc11in //针对32位系统 vs2010 opencv配置 1、配置 (1)、在“视图”中打开“属性管理器”; (2)、在“属性管理器”中双击Demo的项目名称; (3)、在“Demo属性页”->“VC++目录”->“包含目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:opencv247opencvuildinclude ;D:opencv247opencvuildincludeopencv ;D:opencv247opencvuildincludeopencv2 2、在“Demo属性页”->“VC++目录”->“库目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:opencv247opencvuildx86vc10lib 3、在“Demo属性页”(“配置”==“Debug”)->“配置属性”->“链接器”->“输入”->“附加依赖库”中追加下面一行(包括所有分号,勿删VS原始数据): ;opencv_core247d.lib ;opencv_highgui247d.lib ;opencv_video247d.lib ;opencv_ml247d.lib ;opencv_legacy247d.lib ;opencv_imgproc247d.lib 4、在“Demo属性页”(“配置”==“Release”)->“配置属性”->“链接器”->“输入”->“附加依赖库”中追加下面一行(包括所有分号,勿删VS原始数据): ;opencv_core247.lib ;opencv_highgui247.lib ;opencv_video247.lib ;opencv_ml247.lib ;opencv_legacy247.lib ;opencv_imgproc247.lib 5 环境变量设置 ;D:opencv247opencvuildx64vc10in //针对64位系统 ;D:opencv247opencvuildx86vc10in //针对32位系统