is gcc supported only

itk 5.1.2 is installed. In a generated file itk_compiler_detection.h, i saw a few lines:


include “compilers/ITK_COMPILER_INFO_GNU_CXX.h”


error Unsupported compiler


Does this mean only GCC compiler is supported?

Hi @hfeng ,

No, GCC, Clang, Intel, Visual Studio, etc. can be used. This check is to avoid changing compilers in a build, which may be incompatible.

Thanks for the answer.
In my case, itk5.1.2 is already installed. And I am trying to compile something using icc. Then this error information appeared. What could be the reasons?

In the code, itkImage.h is used, and by tracing back layer by layer, itk.Configure.h is used where #include “itk_compiler_detection.h” is used. So this error happened.

That error is a conscience effort to prevent subtle compile incompatibility bugs. I think the conclusion is to build ITK using ICC and use it instead of the system one compiled with GCC.

1 Like