# ITK with DCMTK building error

**URL:** <https://discourse.itk.org/t/itk-with-dcmtk-building-error/593>\
**Category:** Beginner Questions\
**Created:** [January 16, 2018, 2:01pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593 "2018-01-16T14:01:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [January 16, 2018, 2:01pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/1 "2018-01-16T14:01:52Z")

</div>

Hi everyone,

I’m currently trying to build the latest release with DCMTK+ICU.  
Compilation fails due to the following error:  
[…]/ITK\_4-13/Modules/ThirdParty/DCMTK/ITKDCMTK\_ExtProject/ofstd/libsrc/ofchrenc.cc:58:10: fatal error: ‘unicode/ucnv.h’ file not found

Since it seemed like an unicode related error, I tried to build without ICU, but same problem. This may be a pure DCMTK error, but I haven’t found any related topic in the OFFIS forum.  
Did I miss some prerequisite step ?

Tim

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [January 16, 2018, 2:19pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/2 "2018-01-16T14:19:37Z")

</div>

Hi Tim,

In ITK 4.13, ITK’s DCMTK build was extended to include ICU support. There may me some corner issues for certain operating system’s / build systems / compilers.

Could you please let us know what OS / build system / compiler is used in this case to reproduce the issue?

Thanks,  
Matt

CC: @fbudin

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [January 16, 2018, 2:24pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/3 "2018-01-16T14:24:43Z")

</div>

Hello Tim,

Are you building ITK on linux? MacOS?  
I’ll look into it.

Francois

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [January 16, 2018, 3:41pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/4 "2018-01-16T15:41:08Z")

</div>

@matt.mccormick @fbudin  
Thanks for looking into it 🙂

Here are the details:  
MacOS 10.13.2  
Xcode 9.2 ( with Apple LLVM / Clang 9.0 )  
Cmake 3.10.1

I will also try a Windows build to see if I can reproduce.  
-\> EDIT: the configuration with the same Cmake on Windows 10 with VisualStudio17 has built seamlessly.  
I don’t have any linux to try

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [January 19, 2018, 2:25pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/5 "2018-01-19T14:25:36Z")

</div>

Some additional informations: the windows build fails to link during compilation.  
A simple example that just try to instanciate a DCMTKSeriesFileNames lead to following errors:

> [@](#):
>
> ```
> 2>dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol GetAdaptersInfo referenced in function "struct _IP_ADAPTER_INFO * __cdecl getMACAddresses(class OFVector<unsigned char> &)" (?getMACAddresses@@YAPEAU_IP_ADAPTER_INFO@@AEAV?$OFVector@E@@@Z)
> 2>ofstd.lib(ofstd.obj) : error LNK2019: unresolved external symbol NetWkstaUserGetInfo referenced in function "public: static class OFString __cdecl OFStandard::getUserName(void)" (?getUserName@OFStandard@@SA?AVOFString@@XZ)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol u_errorName_59 referenced in function "public: class OFCondition __cdecl OFCharacterEncoding::Implementation::convert(class OFString &,char const *,unsigned__int64)" (?convert@Implementation@OFCharacterEncoding@@QEAA?AVOFCondition@@AEAVOFString@@PEBD_K@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol UCNV_FROM_U_CALLBACK_STOP_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol UCNV_TO_U_CALLBACK_STOP_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol UCNV_FROM_U_CALLBACK_SKIP_59 referenced in function "public: unsigned int __cdecl OFCharacterEncoding::getConversionFlags(void)const " (?getConversionFlags@OFCharacterEncoding@@QEBAIXZ)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol UCNV_TO_U_CALLBACK_SKIP_59 referenced in function "public: class OFCondition __cdecl OFCharacterEncoding::setConversionFlags(unsigned int)" (?setConversionFlags@OFCharacterEncoding@@QEAA?AVOFCondition@@I@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_open_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_close_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_getName_59 referenced in function "public: static class OFString __cdecl OFCharacterEncoding::getLocaleEncoding(void)" (?getLocaleEncoding@OFCharacterEncoding@@SA?AVOFString@@XZ)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_getFromUCallBack_59 referenced in function "public: unsigned int __cdecl OFCharacterEncoding::getConversionFlags(void)const " (?getConversionFlags@OFCharacterEncoding@@QEBAIXZ)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_setToUCallBack_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_setFromUCallBack_59 referenced in function "public: static class OFCharacterEncoding::Implementation * __cdecl OFCharacterEncoding::Implementation::create(class OFString const &,class OFString const &,class OFCondition &)" (?create@Implementation@OFCharacterEncoding@@SAPEAV12@AEBVOFString@@0AEAVOFCondition@@@Z)
> 2>ofstd.lib(ofchrenc.obj) : error LNK2019: unresolved external symbol ucnv_convertEx_59 referenced in function "public: class OFCondition __cdecl OFCharacterEncoding::Implementation::convert(class OFString &,char const *,unsigned__int64)" (?convert@Implementation@OFCharacterEncoding@@QEAA?AVOFCondition@@AEAVOFString@@PEBD_K@Z)
> 2>C:\Code\ArtFun_Segmentation\builds\Release\ArtFun_Segmentation.exe : fatal error LNK1120: 14 unresolved externals
> 
> ```

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [January 22, 2018, 1:59am UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/6 "2018-01-22T01:59:21Z")

</div>

Although there is only an off chance it will fix the issue, DCMTK has been updated to the latest version in ITK Git `master`.

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [January 22, 2018, 12:48pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/7 "2018-01-22T12:48:07Z")

</div>

> [@matt.mccormick](#):
>
> Although there is only an off chance it will fix the issue, DCMTK has been updated to the latest version in ITK Git master.

Tried the master on both previous configurations, alas the issues persist.

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [January 31, 2018, 3:10pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/8 "2018-01-31T15:10:25Z")

</div>

[A patch has been merged in ITK](https://github.com/InsightSoftwareConsortium/ITK/commit/b4afc3823d5991b4ca38a08c006c97dab3c97a0b) and should solve the MacOS build issue you had. Do you have a small project you could share to test your link error on Windows?

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [January 31, 2018, 5:35pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/9 "2018-01-31T17:35:36Z")

</div>

> [@fbudin](#):
>
> A patch has been merged in ITK and should solve the MacOS build issue you had

Great ! Thanks for your commitment on this François. I will try ASAP and report the outcome.

> [@fbudin](#):
>
> Do you have a small project you could share to test your link error on Windows?

That really simple, with a master version downloaded on Jan 22 (after Matt commit updating DCMTK) this MWE will show the errors:

> ```
> #include <itkDCMTKSeriesFileNames.h>
> 
> int main(int argc, char *argv[])
> {
> itk::DCMTKSeriesFileNames::Pointer NameGenerator = itk::DCMTKSeriesFileNames::New();
> 
> return 1;
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [January 31, 2018, 8:27pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/10 "2018-01-31T20:27:28Z")

</div>

Actually, the patch that I mentioned in my previous message did not correct your problem, but [this new one](http://review.source.kitware.com/#/c/23133/) should. Let me know if it is the case.

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [February 1, 2018, 11:54am UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/11 "2018-02-01T11:54:55Z")

</div>

The patch has solved the linking error on Windows 🙂. Thank you !  
On debug config there is just a bunch of warnings:

> ```
> 2>icuucd.lib(putil.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(putil.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(umath.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umath.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(utypes.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utypes.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uinvchar.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uinvchar.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(umutex.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umutex.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucln_cmn.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucln_cmn.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uobject.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uobject.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(cmemory.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(cmemory.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(charstr.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(charstr.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(udata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucmndata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucmndata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(udatamem.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udatamem.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(umapfile.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umapfile.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(udataswp.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udataswp.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucol_swp.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucol_swp.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(utrace.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utrace.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uhash.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uhash.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uenum.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uenum.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ustrenum.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrenum.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uvector.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uvector.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_bld.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_bld.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_cnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_cnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_io.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_io.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_cb.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_cb.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_err.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_err.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvlat1.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvlat1.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_u7.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u7.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_u8.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u8.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_u16.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u16.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_u32.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u32.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvscsu.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvscsu.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvbocu.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvbocu.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_ext.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_ext.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvmbcs.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvmbcs.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv2022.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv2022.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvhz.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvhz.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_lmb.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_lmb.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnvisci.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvisci.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ucnv_ct.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_ct.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(resource.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(resource.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uresbund.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uresbund.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uresdata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uresdata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(locmap.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(locmap.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uloc.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(locid.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(locid.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(stringpiece.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(stringpiece.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(appendable.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(appendable.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ustr_cnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustr_cnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(unistr.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(unistr.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(utf_impl.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utf_impl.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ustring.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustring.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(cstring.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(cstring.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ustrfmt.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrfmt.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(ustrtrns.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrtrns.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(utrie2.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utrie2.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uarrsort.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uarrsort.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(wintz.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(wintz.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uloc_tag.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc_tag.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
> 2>icuucd.lib(uloc_keytype.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc_keytype.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info 
> 
> ```

These seem to be more a ICU problem. I haven’t tried to build without.

The bad news are on MacOS side : the master still fail during build with the very same error.

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [February 1, 2018, 1:59pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/12 "2018-02-01T13:59:53Z")

</div>

Just as a side question rather than opening a new topic, I’ve noticed that there are inconsistent behaviors between the GDCM/DCMTK SeriesFileNames:  
the GetSeriesUIDs method of the former return a list of uniques UIDs found whereas the DCMTK one return all UIDs. Is it expected to stay as it is due to underlying differences ?

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [February 1, 2018, 3:09pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/13 "2018-02-01T15:09:35Z")

</div>

Thanks for testing. The warnings could be solved easily I think if I was packaging the `pdb` file in the ICU package that I create. I am still unsure that this patch is THE solution. I want to understand what is actually happening before I merge it, so it might take a couple of days before `master` works on Windows again.  
I am surprised about the MacOS issue as another ITK developer had an issue with MacOS a couple days ago, and his issue seemed to be solved with one of the recent patches. I’ll take a look at it again.  
As for the differences between DCTMK and GDCM, I don’t know, but maybe @blowekamp or @matt.mccormick will have an idea.

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [February 1, 2018, 3:39pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/14 "2018-02-01T15:39:03Z")

</div>

The API between GDCM/DCMTK SeriesFileNames may not be the same, but this was intended. Some improvements were made in the DCMTK case.

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [February 1, 2018, 3:43pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/15 "2018-02-01T15:43:02Z")

</div>

As far as I’m concerned, the current workaround is sufficient to fiddle with my project.  
Note that building ITK with a “system” DCMTK still works in the master, so users still can use it.  
It is just the fact that you guys make configuration setup way easier with the ITK bundling 👍.  
So many thanks !

> [@matt.mccormick](#):
>
> The API between GDCM/DCMTK SeriesFileNames may not be the same, but this was intended. Some improvements were made in the DCMTK case.

Good to know, as the documentation isn’t really clear on that. Thanks Matt!

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [February 2, 2018, 1:31pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/16 "2018-02-02T13:31:56Z")

</div>

@tim-evain The current work around is incomplete and would need more work to be integrated in ITK:

- The precompiled ICU packages would need to be re-created to include the missing DLL (`icudt.dll`).
- The missing DLL needs to be installed in the correct location in ITK build tree.
- The missing DLL needs to be installed in the correct location in the ITK install tree.

My question for you is: Do you need ICU?  
I could also disable the compilation of ICU on Windows inside ITK. The user could then either build DCMTK without ICU (like it is already done in some projects using ITK, e.g. [3D Slicer](https://github.com/Slicer/Slicer)), or provide their own version of ICU and manage it themselves.

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [February 2, 2018, 1:49pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/17 "2018-02-02T13:49:12Z")

</div>

> [@fbudin](#):
>
> My question for you is: Do you need ICU?

Not at the moment. I’ve built with it “just in case”, but it is not mandatory for my project now.

> [@fbudin](#):
>
> I could also disable the compilation of ICU on Windows inside ITK. The user could then either build DCMTK without ICU (like it is already done in some projects using ITK, e.g. 3D Slicer), or provide their own version of ICU and manage it themselves.

I think this is a nice solution to be sure to have a working build in the master. This way, you will have time to see if ICU can be made afterward.

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [February 2, 2018, 8:41pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/18 "2018-02-02T20:41:25Z")

</div>

@tim-evain: The new version of the patch disables ICU both on Windows and MacOS. This should solve your problems on both platforms. Please let me know if you are able to test it and if it resolves your issues. The patch is available [here](http://review.source.kitware.com/#/c/23133/).

Thanks!

---

<div class="post-metadata">

**Author:** ![tim-evain](https://discourse.itk.org/user_avatar/discourse.itk.org/tim-evain/32/220_2.png) [@tim-evain](https://discourse.itk.org/u/tim-evain)\
**Post date:** [February 5, 2018, 10:51am UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/19 "2018-02-05T10:51:42Z")

</div>

@fbudin

Both issues are effectively solved. Thanks you 🙂

---

<div class="post-metadata">

**Author:** ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)\
**Post date:** [February 6, 2018, 2:38pm UTC](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593/20 "2018-02-06T14:38:58Z")

</div>

I merged the patch in ITK. Thanks for the report and the testing. The integration of DCMTK is likely going to change a bit in the coming months. I have some ideas to try to simplify the current implementation:

- Remove ICU from ITK and let the user deal with special compilations of DCMTK on their own.
- Integrate the source code of DCMTK in ITK using some very recent CMake modules.  
I’ll try to update this topic when these changes happen. They are not at the top of my to-do list.

[Next page](https://discourse.itk.org/t/itk-with-dcmtk-building-error/593.md?page=2)
