ITK: `DCMTK` `IO` module does not compile on Windows

Description

The DCMTK IO module does not compile.

Steps to Reproduce

  1. Configure ITK with the Module_ITKIODCMTK:BOOL=ON; DCMTK_USE_ICU=OFF
  2. Build ITK
  3. ITK will fail to compile with the following message
/Modules/IO/DCMTK/include/itkDCMTKFileReader.h(27,10): fatal error C1083:
Cannot open include file: 'dcmtk/dcmdata/dcdict.h': No such file or directory

The file, however, does exist in the build tree:

/itk-head-Bin/Modules/ThirdParty/DCMTK/ITKDCMTK_ExtProject/dcmdata/include/dcmtk/dcmdata/dcdict.h

Expected behavior

ITK should build with no errors.

Actual behavior

It does not build.

Reproducibility

100%.

Versions

ITK master.

Environment

OS: Windows 10 CMake: 3.20.3 Compiler: MSVC 2019 19.29.30133.0 Build: static; debug

Additional Information

Reproduced/confirmed by @dzenanz in https://github.com/InsightSoftwareConsortium/ITK/pull/2796#issuecomment-940259623.

The DCMTK module compiles fine as stand-alone project for the tag used in ITK, but linking to it as a system module (ITK_USE_SYSTEM_DCMTK) in CMake results also in another type of errors:

LINK : fatal error LNK1104: cannot open file 'ofstd.lib'

The file, however, does exist in the DCMTK build tree:

/dcmtk-Bin/lib/Debug

Related to PR #2796.

The warnings cast when building DCMTK were reported in #2798.

The module seems to compile fine on Linux: https://open.cdash.org/build/7512875/notes https://open.cdash.org/build/7512875

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

Thanks for the information @issakomi. I had tried compiling a few days ago without success, and the same error being reported. Now I’ve tried again this afternoon with a clean build and it looks like things are OK. I need to have a closer look. I will follow up with this as time permits.

The error

LINK : fatal error LNK1104: cannot open file 'ofstd.lib

appears when using a system DCMTK.

Thus, there are multiple errors, from different nature, with the module, and thus I think the issue is still applicable and different from #2872. Note that the above error was reproduced by @dzenanz, as commented in the original issue report.

Note that this error appeared as I tried to use a system DCMTK because the remote module build was failing. I grant that the remote was originally failing with a different error (see the original issue report):

/Modules/IO/DCMTK/include/itkDCMTKFileReader.h(27,10): fatal error C1083:
Cannot open include file: 'dcmtk/dcmdata/dcdict.h': No such file or directory

but even if in the experimental build it does not seem to be present, I should double check with a regular build.

So I am not quite in favor of closing the issue.