首页 > 代码库 > VS2010下静态链接OpenCV库的设置

VS2010下静态链接OpenCV库的设置

一、Debug模式下的设置:


设置Include Directories和Library Directories:

wKiom1NqH5WCiRBtAANgOeDf9go075.jpg


设置Runtime library,Debug模式下用MTd

wKioL1NqH2ugvKwlAAOgZf0xd2k281.jpg


设置Additional Dependencies

wKiom1NqH5byo0tGAAMpOqiXSfA987.jpg


Debug模式下加入的lib

wKiom1NqH5byQdnSAAIPn5Lg5fk299.jpg


二、Release模式下的设置

设置Include Directories和Library Directories:

wKioL1NqH2viwL7TAANJIiFLv7Y872.jpg



设置Runtime library,Release模式下用MT

wKiom1NqH5bBuGZvAAORYlYQEBI186.jpg


设置Additional Dependencies

wKioL1NqH2ziGt4NAAMpUKPVV0E623.jpg


Release模式下加入的lib

wKiom1NqH5eCQqg6AAH4hOcKFXc413.jpg


三、Debug和Release模式下,需要的lib文件不同,Debug下多了d字母。

1. Release模式下,需要添加的lib文件:

vfw32.lib
comctl32.lib
zlib.lib
libjasper.lib
libjpeg.lib
libpng.lib
libtiff.lib
IlmImf.lib
opencv_core249.lib
opencv_imgproc249.lib
opencv_highgui249.lib
opencv_ml249.lib
opencv_video249.lib
opencv_features2d249.lib
opencv_calib3d249.lib
opencv_objdetect249.lib
opencv_contrib249.lib
opencv_legacy249.lib
opencv_flann249.lib

2. Debug模式下,需要添加的lib文件:
vfw32.lib
comctl32.lib
zlibd.lib
libjasperd.lib
libjpegd.lib
libpngd.lib
libtiffd.lib
IlmImfd.lib
opencv_core249d.lib
opencv_imgproc249d.lib
opencv_highgui249d.lib
opencv_ml249d.lib
opencv_video249d.lib
opencv_features2d249d.lib
opencv_calib3d249d.lib
opencv_objdetect249d.lib
opencv_contrib249d.lib
opencv_legacy249d.lib
opencv_flann249d.lib

本文出自 “GONE WITH THE WIND” 博客,请务必保留此出处http://h2appy.blog.51cto.com/609721/1408087