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:\opencv247\opencv\build\include ;D:\opencv247\opencv\build\include\opencv ;D:\opencv247\opencv\build\include\opencv2 2、在“Demo属性页”->“VC++目录”->“库目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:\opencv247\opencv\build\x86\vc11\lib 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:\opencv247\opencv\build\x64\vc11\bin //针对64位系统 ;D:\opencv247\opencv\build\x86\vc11\bin //针对32位系统 vs2010 opencv配置 1、配置 (1)、在“视图”中打开“属性管理器”; (2)、在“属性管理器”中双击Demo的项目名称; (3)、在“Demo属性页”->“VC++目录”->“包含目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:\opencv247\opencv\build\include ;D:\opencv247\opencv\build\include\opencv ;D:\opencv247\opencv\build\include\opencv2 2、在“Demo属性页”->“VC++目录”->“库目录”中追加下面一行(包括所有分号,勿删VS原始数据): ;D:\opencv247\opencv\build\x86\vc10\lib 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:\opencv247\opencv\build\x64\vc10\bin //针对64位系统 ;D:\opencv247\opencv\build\x86\vc10\bin //针对32位系统