(原)vs2013静态及动态链接opencv3.0的库

转载请注明出处:

http://www.cnblogs.com/darkknightzh/p/5477551.html

静态链接步骤如下:

1. 在“通用配置”-“VC++目录”-“包含目录”中添加:

C:\opencv30\build\include

C:\opencv30\build\include\opencv

C:\opencv30\build\include\opencv2

2. 在“通用配置”-“VC++目录”-“库目录”中添加:

C:\opencv30\build\x86\vc12\staticlib

3. 在“通用配置”-“链接器”-“输入”-“附加依赖项”中添加(只需要添加必须的,由于不知道需要具体需要哪些,因而都加上了):

opencv_calib3d300.lib

opencv_core300.lib

opencv_features2d300.lib

opencv_flann300.lib

opencv_hal300.lib

opencv_highgui300.lib

opencv_imgcodecs300.lib

opencv_imgproc300.lib

opencv_ml300.lib

opencv_objdetect300.lib

opencv_photo300.lib

opencv_shape300.lib

opencv_stitching300.lib

opencv_superres300.lib

opencv_ts300.lib

opencv_video300.lib

opencv_videoio300.lib

opencv_videostab300.lib

zlib.lib

zlibd.lib

IlmImf.lib

ippicvmt.lib

libjasper.lib

libjpeg.lib

libpng.lib

libtiff.lib

libwebp.lib

 

动态链接的话,步骤1不变

2. 库路径改为:

C:\opencv30\build\x86\vc12\lib

3. 库改为:

opencv_ts300.lib

opencv_world300.lib

 

ps:1.静态链接的话,生成的程序会大很多。(动态352kB VS静态13.6M。当然,与具体程序有关)

2. 上面是release模式时的设置,如果是debug模式的话,各.lib之前加上d即可,如(opencv_calib3d300d.lib或opencv_ts300d.lib)

posted on 2016-05-10 13:46  darkknightzh  阅读(3351)  评论(0编辑  收藏  举报

导航