vs2010配置opencv2.4.7
需要注意:opencv里x86的vc10对应vs2010版本,vc11对应vs2012版本,vc12对应vs2013及以上版本,若vs2013版本的软件配置时选择vc10,则有很多库函数会出错。
配置opencv环境变量:
步骤:计算机->(右键)属性->高级系统设置->高级(标签)->环境变量->(双击)path(用户,系统里面的path任选其一)->在变量值里面添加” %opencv%
\build\x86\vc10\bin”和”%opencv%\build\common\tbb\ia32\vc10”(里面的%opencv%记得换成自己的opencv路径。例如我的:D:\program\ifly\bin;D:\Program Files (x86)\opencv\build\x86\vc10\bin;D:\Program Files (x86)\opencv\build\common\tbb\ia32\vc10)。
配置工程的opencv依赖:ps:一定是在视图-属性管理器-找到Microsoft.Cpp.Win32.user的属性配置。
vc++目录
包含目录
D:\opencv\opencv\build\include
D:\opencv\opencv\build\include\opencv
D:\opencv\opencv\build\include\opencv2
库目录
D:\opencv\opencv\build\x86\vc10\lib\
连接器-输入-附加依赖项
opencv_calib3d247d.lib
opencv_contrib247d.lib
opencv_core247d.lib
opencv_features2d247d.lib
opencv_flann247d.lib
opencv_gpu247d.lib
opencv_highgui247d.lib
opencv_imgproc247d.lib
opencv_legacy247d.lib
opencv_ml247d.lib
opencv_objdetect247d.lib
opencv_ts247d.lib
opencv_video247d.lib
opencv_nonfree247d.lib
opencv_ocl247d.lib
opencv_photo247d.lib
opencv_stitching247d.lib
opencv_superres247d.lib
opencv_videostab247d.lib
opencv_calib3d247.lib
opencv_contrib247.lib
opencv_core247.lib
opencv_features2d247.lib
opencv_flann247.lib
opencv_gpu247.lib
opencv_highgui247.lib
opencv_imgproc247.lib
opencv_legacy247.lib
opencv_ml247.lib
opencv_objdetect247.lib
opencv_ts247.lib
opencv_video247.lib
opencv_nonfree247.lib
opencv_ocl247.lib
opencv_photo247.lib
opencv_stitching247.lib
opencv_superres247.lib
opencv_videostab247.lib