ITK Installation error: "ptrdiff_t"

I am a beginner and I am following the ITK Software guide: https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.2.1/InsightSoftwareGuide-Book1-5.2.1.pdf

Unfortunately, after setting up CMake and generating the configuration, and typing make, I get the following error:

Consolidate compiler generated dependencies of target ITKCommon
[ 29%] Building CXX object Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/__/itkBuildInformation.cxx.o
[ 29%] Building CXX object Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkTotalProgressReporter.cxx.o
In file included from /n/scratch3/users/c/cl266/ITK/Modules/Core/Common/include/itkImageRegion.h:33:0,
                 from /n/scratch3/users/c/cl266/ITK/Modules/Core/Common/include/itkMultiThreaderBase.h:35,
                 from /n/scratch3/users/c/cl266/ITK/Modules/Core/Common/src/itkTotalProgressReporter.cxx:19:
/n/scratch3/users/c/cl266/ITK/Modules/Core/Common/include/itkSize.h:242:27: error: ‘ptrdiff_t’ does not name a type
   using difference_type = ptrdiff_t;
                           ^~~~~~~~~
make[2]: *** [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/itkTotalProgressReporter.cxx.o] Error 1
make[1]: *** [Modules/Core/Common/src/CMakeFiles/ITKCommon.dir/all] Error 2
make: *** [all] Error 2

Could anyone help me out for this?

It looks like the C compiler version was the culprit, by choosing the correct compiler and re-configuring with CMake made it further!

2 Likes