Environment:
- Windows 10 version 1803
- Visual Studio 2015 Update 3
- CMake 3.11.4
Building configurations:
- The DCMTK source package is dcmtk-3.6.3.tar.gz downloaded from https://dicom.offis.de/dcmtk
- The 3rd party pre-compiled binaries is dcmtk-3.6.3-win64-support_MD-msvc-14.0.zip downloaded from ftp://dicom.offis.de/pub/dicom/offis/so ... 3/support/. It is uncompressed under the DCMTK root directory.
- The cmake command line is:
Code: Select all
cmake -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_INSTALL_PREFIX=C:\...\dcmtk-3.6.3\install_ -DDCMTK_ENABLE_STL=ON -DDCMTK_ENABLE_CXX11:BOOL=ON -DDCMTK_WITH_DOXYGEN=1 -DDCMTK_WITH_XML=ON -DWITH_LIBXMLINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\libxml2-2.9.7 -DDCMTK_WITH_PNG=ON -DWITH_LIBPNGINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\libpng-1.6.34 -DDCMTK_WITH_TIFF=ON -DWITH_LIBTIFFINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\libtiff-4.0.9 -DDCMTK_WITH_ZLIB=ON -DWITH_ZLIBINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\zlib-1.2.11 -DDCMTK_WITH_ICONV=ON -DWITH_LIBICONVINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\libiconv-1.15 -DDCMTK_WITH_OPENSSL=ON -DWITH_OPENSSLINC=C:\...\dcmtk-3.6.3\dcmtk-3.6.3-win64-support_MD-msvc-14.0\openssl-1.1.0g -G"Visual Studio 14 2015 Win64" ..
Errors (only a small part of them):
I checked libtiff_o.lib in the pre-built package using dumpbin, and found that all the above unresolved functions reside in it. My building steps should be canonical so I can see nowhere that could introduce problems. The build is clean so there is no cache residues that may cause any issue. I am at my wit's end so I ask here what the matter is and how to fix the linking problem. Thank you.38>libtiff_o.lib(tif_unix.obj) : error LNK2019: unresolved external symbol __imp_open referenced in function TIFFOpen
38>OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol __imp_open
38>libtiff_o.lib(tif_unix.obj) : error LNK2019: unresolved external symbol __imp_read referenced in function _tiffReadProc
38>OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp_read
38>libtiff_o.lib(tif_unix.obj) : error LNK2019: unresolved external symbol __imp_write referenced in function _tiffWriteProc
38>OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp_write
38>libtiff_o.lib(tif_dirinfo.obj) : error LNK2019: unresolved external symbol __imp_bsearch referenced in function TIFFFindField
38>libpng_o.lib(pngget.obj) : error LNK2019: unresolved external symbol __imp_atof referenced in function png_get_sCAL
38>C:\...\dcmtk-3.6.3\build\bin\Release\dcmj2pnm.exe : fatal error LNK1120: 5 unresolved externals