# Error about DCMTK in Building Slicer from source

**URL:** <https://discourse.slicer.org/t/error-about-dcmtk-in-building-slicer-from-source/10454>\
**Category:** Support\
**Tags:** build\
**Created:** [February 27, 2020, 4:33am UTC](https://discourse.slicer.org/t/error-about-dcmtk-in-building-slicer-from-source/10454 "2020-02-27T04:33:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akash23](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@Akash23](https://discourse.slicer.org/u/Akash23)\
**Post date:** [February 27, 2020, 4:33am UTC](https://discourse.slicer.org/t/error-about-dcmtk-in-building-slicer-from-source/10454/1 "2020-02-27T04:33:30Z")

</div>

Dear all,  
Could you help me solve my problem as follows please?  
Operating system: Ubuntu 18 (subsystem of windows 10)  
Slicer version: pulled most recent commit  
gcc/g++ version: 7.4  
Qt version: 5.14  
cmake version: 3.13  
I ran the cmake command as:

```auto
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQt5_DIR:PATH=/home/me/Qt5.14.0/5.14.0/gcc_64/lib/cmake/Qt5 -DSlicer_USE_SYSTEM_QT:BOOL=1 ../Slicer 

```

Actual behavior:

```auto
error: ‘DCMTK_CHAR_MODULO’ was not declared in this scope
     static const OFBool is_modulo = DCMTK_CHAR_MODULO;
                                                       ^ ~~~~~~~~~~~~~~~~
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1044:55: note: suggested alternative: ‘DCMTK_SHARED’
     static const OFBool is_modulo = DCMTK_CHAR_MODULO;
                                                       ^ ~~~~~~~~~~~~~~~~
                                                       DCMTK_SHARED
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1057:55: error: ‘DCMTK_CHAR_TRAPS’ was not declared in this scope
     static const OFBool traps = DCMTK_CHAR_TRAPS;
                                                       ^ ~~~~~~~~~~~~~~~
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1057:55: note: suggested alternative: ‘DCMTK_SHARED’
     static const OFBool traps = DCMTK_CHAR_TRAPS;
                                                       ^ ~~~~~~~~~~~~~~~
                                                       DCMTK_SHARED
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1085:55: error: ‘DCMTK_SIGNED_CHAR_MODULO’ was not declared in this scope
     static const OFBool is_modulo = DCMTK_SIGNED_CHAR_MODULO;
                                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1085:55: note: suggested alternative: ‘DCMTK_SIGNED_CHAR_DIGITS10’
     static const OFBool is_modulo = DCMTK_SIGNED_CHAR_MODULO;
                                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~
                                                       DCMTK_SIGNED_CHAR_DIGITS10
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1094:55: error: ‘DCMTK_SIGNED_CHAR_TRAPS’ was not declared in this scope
     static const OFBool traps = DCMTK_SIGNED_CHAR_TRAPS;
                                                       ^ ~~~~~~~~~~~~~~~~~~~~~~
/home/me/MyProjects/Slicer-SuperBuild-Debug/DCMTK/ofstd/include/dcmtk/ofstd/oflimits.h:1094:55: note: suggested alternative: ‘DCMTK_SIGNED_CHAR_DIGITS10’
     static const OFBool traps

```

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [February 27, 2020, 4:40am UTC](https://discourse.slicer.org/t/error-about-dcmtk-in-building-slicer-from-source/10454/2 "2020-02-27T04:40:07Z")

</div>

I doubt this is the reason, but note that the minimum required version of cmake is 3.13.4, and your log reports 3.13. This should be easy to fix.

Also, can you check if DCMTK is not installed in some other system-wide location on your system? This can cause problems sometime, due to use of conflicting header (this issue may be relevant: [https://github.com/QIICR/dcmqi/issues/395](https://github.com/QIICR/dcmqi/issues/395)).
