# Visual Studio RTTI configuration error

**URL:** https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620
**Category:** Beginner Questions
**Tags:** visual-studio, cmake
**Created:** [February 21, 2019, 7:06pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620 "2019-02-21T19:06:35Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Pooja\_Virkar](https://discourse.itk.org/user_avatar/discourse.itk.org/pooja_virkar/32/804_2.png) [@Pooja\_Virkar](https://discourse.itk.org/u/Pooja_Virkar)
#### Post date: [February 21, 2019, 7:06pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/1 "2019-02-21T19:06:35Z")

</div>

Hello,

I am trying install ITK. But getting following errors.  
Error 1-  
CMake Error at Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake:410 (message):  
Compilers that do not support RTTI are not supported

Error 2 -  
Call Stack (most recent call first):  
Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt:183 (include)

Warning -  
Make Warning at CMakeLists.txt:254 (message):  
ITKV3\_COMPATIBILITY will be removed starting in ITK version 5.0.

I am using Visual Studio C++ compiler here.  
Kindly give me solution for this problem.  
Thanks in advance.

---

<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 22, 2019, 8:27pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/2 "2019-02-22T20:27:43Z")

</div>

Hi @Pooja_Virkar,

Welcome to ITK! ☀

Did you follow the _Configuring and Building ITK_ section of the [ITK Software Guide](https://www.itk.org/ItkSoftwareGuide.pdf)?

---

<div class="post-metadata">

### Author: ![Pooja\_Virkar](https://discourse.itk.org/user_avatar/discourse.itk.org/pooja_virkar/32/804_2.png) [@Pooja\_Virkar](https://discourse.itk.org/u/Pooja_Virkar)
#### Post date: [February 23, 2019, 10:38am UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/3 "2019-02-23T10:38:46Z")

</div>

Hello Matt,

Yes I followed the ITK software guide.  
But still I am getting those errors.  
Should I need to enable RTTI?  
But how to do it?  
And also I dont understand to solve that error 2 and warning.

---

<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 24, 2019, 1:47am UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/4 "2019-02-24T01:47:14Z")

</div>

Hi @Pooja_Virkar,

Run time type information (RTTI) should be available in Visual Studio by default – this indicates there is some kind of issue with the compiler / compiler recognition / compiler environment.

Please try the following:

1. Start with a clean build tree.
2. Start `cmake-gui` from a Visual Studio command prompt.

What version of Visual Studio and ITK are you using?

---

<div class="post-metadata">

### Author: ![Pooja\_Virkar](https://discourse.itk.org/user_avatar/discourse.itk.org/pooja_virkar/32/804_2.png) [@Pooja\_Virkar](https://discourse.itk.org/u/Pooja_Virkar)
#### Post date: [February 24, 2019, 9:51am UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/5 "2019-02-24T09:51:24Z")

</div>

Hello,

I am using Microsoft Visual studio community 2017 Version 15.9.7  
& ITK version 4.13.1  
I am using Windows 10 with 64-bit O.S.  
I have one more doubt. should I use “cmake-3.14.0-rc2-win64-x64” or  
“cmake-3.14.0-rc2-win32-x86”?

I am new to the ITK.  
So Can you please elaborate what is mean by “Clean build tree”? & how to do it?  
& I am getting following message after giving cmake-gui command.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\>cmake-gui  
‘cmake-gui’ is not recognized as an internal or external command,  
operable program or batch file.

Please help me by guiding with steps.

Thanks.

---

<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 24, 2019, 2:50pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/6 "2019-02-24T14:50:30Z")

</div>

👍 thanks for the information.

> [@About the Beginner Questions category](https://discourse.itk.org/t/about-the-beginner-questions-category/28/7):
>
> I have one more doubt. should I use “cmake-3.14.0-rc2-win64-x64” or  
> “cmake-3.14.0-rc2-win32-x86”?

Since you have a 64 bit OS, use the 64 bit version. Try _cmake-3.13.4-win64-x64.msi_.

A clean build tree means deleting all the content of the ITK build folder, e.g. _ITK-build_.

It is OK to not start CMake from the Visual Studio command prompt; but, pick a Visual Studio CMake _generator_ during the initial configuration that corresponds to the version you have installed.

Please let us know how it goes.

---

<div class="post-metadata">

### Author: ![Pooja\_Virkar](https://discourse.itk.org/user_avatar/discourse.itk.org/pooja_virkar/32/804_2.png) [@Pooja\_Virkar](https://discourse.itk.org/u/Pooja_Virkar)
#### Post date: [February 24, 2019, 6:11pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/7 "2019-02-24T18:11:33Z")

</div>

Hello,

I have cleared ITK build folder. And did configuration using cmake-gui by selecting Visual studio 2017 generator.

But now I am getting following error.

CMake Error at C:/Users/pooja virkar/Desktop/Study materials/4th semester/pooja/cmake-3.14.0-rc2-win64-x64/share/cmake-3.14/Modules/CMakeTestCXXCompiler.cmake:53 (message):  
The C++ compiler

```
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe"

```

is not able to compile a simple test program.

It fails with the following output:

```
Change Dir: C:/MyProjects/ITK-bin/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_9805a.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x86

  Copyright (C) Microsoft Corporation. All rights reserved.

  cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_9805a.dir\Debug\\" /Fd"cmTC_9805a.dir\Debug\vc141.pdb" /Gd /TP /analyze- /errorReport:queue "C:\MyProjects\ITK-bin\CMakeFiles\CMakeTmp\testCXXCompiler.cxx"

  testCXXCompiler.cxx

  

cl : Command line error D8050: cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\c1xx.dll': failed to get command line into debug records [C:\MyProjects\ITK-bin\CMakeFiles\CMakeTmp\cmTC_9805a.vcxproj]

```

CMake will not be able to correctly generate this project.  
Call Stack (most recent call first):  
CMakeLists.txt:28 (project)

Configuring incomplete, errors occurred!  
See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeOutput.log”.  
See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeError.log”.

But then following steps helped me to remove this error.

1. Right-Click on Properties on `cl.exe` in your VS install directory (the exact path appears in the CMake error);
2. Choose the Compatibility Tab;
3. Check “Run this program as administrator” in the “Privilege Level” box.

**After that I again configured it, but now I got following errors.**

CMake Error at CMakeLists.txt:28 (project):  
No CMAKE\_CXX\_COMPILER could be found.

CMake Error at CMakeLists.txt:28 (project):  
No CMAKE\_C\_COMPILER could be found.

Configuring incomplete, errors occurred!

See also "C:/MyProjects/ITK-bin/CMakeFiles/CMakeOutput.log".

See also "C:/MyProjects/ITK-bin/CMakeFiles/CMakeError.log". **strong text**

Please provide solution for the above error.

---

<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 24, 2019, 9:46pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/8 "2019-02-24T21:46:22Z")

</div>

> C:/Users/pooja virkar/Desktop/Study materials/4th semester/pooja/cmake-3.14.0-rc2-win64-x64/share/cmake-3.14/Modules/

Windows has path length issues, so it is recommended to install CMake into a shorter path, e.g. _C:\CMake_ or the standard _C:\Program Files\CMake_.

> Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x86

This is for a 32-bit build. Unless there is a specific reason for a 32-bit build, a 64-bit build is recommended.

---

<div class="post-metadata">

### Author: ![Pooja\_Virkar](https://discourse.itk.org/user_avatar/discourse.itk.org/pooja_virkar/32/804_2.png) [@Pooja\_Virkar](https://discourse.itk.org/u/Pooja_Virkar)
#### Post date: [February 25, 2019, 6:17pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/9 "2019-02-25T18:17:04Z")

</div>

Hello,

I did change the path for CMake.  
But I couldn’t solve following errors.

CMake Error at CMakeLists.txt:28 (project):  
No CMAKE\_CXX\_COMPILER could be found.

CMake Error at CMakeLists.txt:28 (project):  
No CMAKE\_C\_COMPILER could be found.

Configuring incomplete, errors occurred!

See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeOutput.log”.

See also “C:/MyProjects/ITK-bin/CMakeFiles/CMakeError.log”.

Please tell me what should I do?

---

<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: [February 26, 2019, 5:48pm UTC](https://discourse.itk.org/t/visual-studio-rtti-configuration-error/1620/10 "2019-02-26T17:48:21Z")

</div>

There seems to be something wrong with your Visual Studio installation. Try “repairing” your installation: from Visual Studio Installer click “More”, then “Repair”.

Probably not related, but might be worth checking is disappearance of `rc.exe` from [VS2015 installation](https://stackoverflow.com/questions/43847542/rc-exe-no-longer-found-in-vs-2015-command-prompt).
