1. 程式人生 > >OpenCV2.4.13+VS2013開發環境配置

OpenCV2.4.13+VS2013開發環境配置

highgui sta 應用程序 應用 per 系統變量 err c++ free

1、給系統變量配置path:添加:D:\opencv2_4_13\opencv\build\x86\vc12\bin

技術分享

2、給用戶變量添加opencv變量,值D:\opencv2_4_13\opencv\build

添加PATH變量(有就不需要添加,但是值需要添加)值D:\opencv2_4_13\opencv\build\x86\vc12\bin

3、新建visual C項目 Win32控制臺應用程序

新建 visual C++項目,如下圖所示

4、屬性管理器:

註意:debug和release都要配置

1、debug:

1)VC++目錄->包含目錄

添加

D:\opencv2_4_13\opencv\build\include

D:\opencv2_4_13\opencv\build\include\opencv

D:\opencv2_4_13\opencv\build\include\opencv2

技術分享

2)VC++目錄->庫目錄

添加:

D:\opencv2_4_13\opencv\build\x86\vc12\lib

技術分享

3)鏈接器->輸入->附加依賴項

添加:

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

技術分享

2、Release

1)、2)與debug版本一樣

3)添加:

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

OpenCV2.4.13+VS2013開發環境配置