先说一下vc几代表的对应版本:
vc8 = Visual Studio 2005
vc9 = Visual Studio 2008
vc10 = Visual Studio 2010
vc11 = Visual Studio 2012
vc12 = Visual Studio 2013
vc14 = Visual Studio 2015
本文重点讲OpenCV2.4.13 配 VS2013,因为OpenCV2没3坑多,VS2013又智能又兼容老旧工程:
环境变量:
D:\Soft\OpenCV2\build\x86\vc12\bin;
包含目录:
D盘版本:D:\Soft\OpenCV2\build\include;D:\Soft\OpenCV2\build\include\opencv;D:\Soft\OpenCV2\build\include\opencv2;
C盘版本:C:\Soft\OpenCV2\build\include;C:\Soft\OpenCV2\build\include\opencv;C:\Soft\OpenCV2\build\include\opencv2;
库目录:
D盘版本:D:\Soft\OpenCV2\build\x86\vc12\lib;D:\Soft\OpenCV2\build\x86\vc12\staticlib;
C盘版本:C:\Soft\OpenCV2\build\x86\vc12\lib;C:\Soft\OpenCV2\build\x86\vc12\staticlib;
链接器->输入->附加依赖项(Release):
opencv_objdetect2413.lib
opencv_ts2413.lib
opencv_video2413.lib
opencv_nonfree2413.lib
opencv_ocl2413.lib
opencv_photo2413.lib
opencv_stitching2413.lib
opencv_superres2413.lib
opencv_videostab2413.lib
opencv_calib3d2413.lib
opencv_contrib2413.lib
opencv_core2413.lib
opencv_features2d2413.lib
opencv_flann2413.lib
opencv_gpu2413.lib
opencv_highgui2413.lib
opencv_imgproc2413.lib
opencv_legacy2413.lib
opencv_ml2413.lib
链接器->输入->附加依赖项(Debug):
opencv_ml2413d.lib
opencv_calib3d2413d.lib
opencv_contrib2413d.lib
opencv_core2413d.lib
opencv_features2d2413d.lib
opencv_flann2413d.lib
opencv_gpu2413d.lib
opencv_highgui2413d.lib
opencv_imgproc2413d.lib
opencv_legacy2413d.lib
opencv_objdetect2413d.lib
opencv_ts2413d.lib
opencv_video2413d.lib
opencv_nonfree2413d.lib
opencv_ocl2413d.lib
opencv_photo2413d.lib
opencv_stitching2413d.lib
opencv_superres2413d.lib
opencv_videostab2413d.lib