# is gcc supported only

**URL:** https://discourse.itk.org/t/is-gcc-supported-only/4098
**Category:** Engineering
**Created:** [May 4, 2021, 11:50pm UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098 "2021-05-04T23:50:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hfeng](https://discourse.itk.org/letter_avatar_proxy/v4/letter/h/b5ac83/32.png) [@hfeng](https://discourse.itk.org/u/hfeng)
#### Post date: [May 4, 2021, 11:50pm UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098/1 "2021-05-04T23:50:55Z")

</div>

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

# if ITK\_COMPILER\_IS\_GNU

# include “compilers/ITK\_COMPILER\_INFO\_GNU\_CXX.h”

# else

# error Unsupported compiler

# endif

Does this mean only GCC compiler is supported?

---

<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: [May 5, 2021, 2:50am UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098/2 "2021-05-05T02:50:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![hfeng](https://discourse.itk.org/letter_avatar_proxy/v4/letter/h/b5ac83/32.png) [@hfeng](https://discourse.itk.org/u/hfeng)
#### Post date: [May 5, 2021, 4:14am UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098/3 "2021-05-05T04:14:56Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![hfeng](https://discourse.itk.org/letter_avatar_proxy/v4/letter/h/b5ac83/32.png) [@hfeng](https://discourse.itk.org/u/hfeng)
#### Post date: [May 5, 2021, 4:23am UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098/4 "2021-05-05T04:23:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [May 5, 2021, 1:11pm UTC](https://discourse.itk.org/t/is-gcc-supported-only/4098/5 "2021-05-05T13:11:34Z")

</div>

That error is a conscience effort to prevent subtle compile incompatibility bugs. I think the [conclusion](https://discourse.itk.org/t/unsupported-compiler-error-when-linking-with-intel-compiler/3709) is to build ITK using ICC and use it instead of the system one compiled with GCC.
