我们知道,在引用lib的时候,只需要配置项目属性
1、 Linker->General里,Additional Library Directories里填写lib所在的文件夹
2、Linker->Input里,在Additional Dependencies 里依次加上
wsock32.lib;netapi32.lib;ofstd.lib;oflog.lib;dcmdata.lib;zlib.lib;
如果还需要其他
dcmtk 的lib,尽量遵守以下引入顺序:
顺序1:
advapi32.lib
oflog.lib
netapi32.lib
wsock32.lib
ofstd.lib
dcmdata.lib
dcmimgle.lib
dcmimage.lib
ijg8.lib
ijg12.lib
ijg16.lib
dcmjpeg.lib
dcmnet.lib
dcmdsig.lib
dcmsr.lib
dcmtls.lib
dcmpstat.lib
dcmwlm.lib
dcmqrdb.lib
顺序2:
WS2_32.lib;NetAPI32.lib;WSock32.lib;charls.lib;dcmdata.lib;dcmdsig.lib;dcmimage.lib;dcmimgle.lib;dcmjpeg.lib;dcmjpls.lib;dcmnet.lib;dcmpstat.lib;dcmqrdb.lib;dcmsr.lib;dcmtls.lib;dcmwlm.lib;i2d.lib;ijg8.lib;ijg12.lib;ijg16.lib;oflog.lib;ofstd.lib;
3、lib依赖关系
The DCMTK libraries have the following internal dependencies (modules introduced with DCMTK 3.6.0 are not listed here):lib的依赖关系如下:
dcmdata 依赖 ofstd
dcmimage
依赖
dcmimgle, dcmdata, ofstd
dcmimgle
依赖
dcmdata, ofstd
dcmjpeg
依赖
ijg8, ijg12, ijg16, dcmimage, dcmimgle, dcmdata, ofstd
dcmnet
依赖
dcmdata, ofstd
dcmpstat
依赖
dcmimage, dcmimgle, dcmsign, dcmsr, imagectn, dcmtls, dcmnet, dcmdata, ofstd
dcmsign
依赖
dcmdata, ofstd
dcmsr
依赖
dcmdata, ofstd
dcmtls
依赖
dcmnet, dcmdata, ofstd
dcmwlm
依赖
dcmnet, dcmdata, ofstd
imagectn/dcmqrdb
依赖
dcmnet, dcmdata, ofstd
依赖关系图如下:
参考文章:1、DCMTK官方论坛:
FAQ #27: Compilation of DCMTK-based program fails with LNK2001 [MSVC]