opencv2411配置

转载自:http://www.cnblogs.com/begoogatprogram/p/5733948.html

Release的属性中:链接器-》输入-》附加依赖项
opencv_contrib2411.lib
opencv_calib3d2411.lib
opencv_core2411.lib
opencv_features2d2411.lib
opencv_flann2411.lib
opencv_gpu2411.lib
opencv_highgui2411.lib
opencv_imgproc2411.lib
opencv_legacy2411.lib
opencv_ml2411.lib
opencv_nonfree2411.lib
opencv_ocl2411.lib
opencv_objdetect2411.lib
opencv_photo2411.lib
opencv_stitching2411.lib
opencv_superres2411.lib
opencv_ts2411.lib
opencv_video2411.lib
opencv_videostab2411.lib


Debug的属性中:链接器-》输入-》附加依赖项
opencv_flann2411d.lib
opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_gpu2411d.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_ml2411d.lib
opencv_nonfree2411d.lib
opencv_objdetect2411d.lib
opencv_ocl2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_superres2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_videostab2411d.lib

配置环境变量
1.系统变量 Path:添加D:\Program Files\opencv\build\x86\vc12\bin
2.用户变量:添加opencv变量,值D:\Program Files\opencv\build,添加PATH变量(有就不需要添加,但是值需要添加)值D:\Program Files\opencv\build\x86\vc12\bin
(说明:不管你系统是32位还是64位,路径目录均选择X86,因为编译都是使用32位编译;如果选用X64,则程序运行时候会出错。)

工程目录的配置(Debug)
1.VC++目录-》包含目录:
D:\Program Files\opencv\build\include
D:\Program Files\opencv\build\include\opencv
D:\Program Files\opencv\build\include\opencv2
2.VC++目录-》库目录:
D:\Program Files\opencv\build\x86\vc12\lib
3.链接器-》输入-》附加依赖项

配置Release工程目录:
其他与Debug一样,只是连接器->输入->附加依赖项不一样

更新:注意!若电脑是64位的,且程序也是64位的,在添加库目录时需要添加64位的:K:\software\opencv2411\build\x64\vc12\lib。否则会出现很多无法解析的外部命令。

你可能感兴趣的:(编程)