4

I have been trying to install CMake for vtk, but I'm getting this error message:

The C compiler identification is unknown,The CXX compiler identification is unknown.

I'm using CMake 3.2.1, vtk 6.2.0 and Visual Studio 2015.

Screenshot

usr1234567
  • 21,601
  • 16
  • 108
  • 128
Shahin Shah
  • 41
  • 1
  • 1
  • 5
  • Find [this](https://stackoverflow.com/a/46166632/9968771) post fixing my issue which started with the same error in this thread but in real it was due to the fact that rc.exe and rc.dll where missing from Windows 10 SDK – rgigante Jun 20 '18 at 16:53

3 Answers3

4

Please take a look at this answer if it helps: CMake does not find Visual C++ compiler

Basically VS2015 doesn't install Cx compilers by default. Creating a C++ project in VS2015 will force VS to download necessary compilers.

Community
  • 1
  • 1
zeldi
  • 4,833
  • 3
  • 19
  • 18
1

here is what worked for me:

  1. Relaunch Visual Studio 2015 install
  2. Choose "modify"
  3. Check that both this components are installed: "Common tools for visual c++ 2015" AND "Tools and Windows XX SDK"
  4. If not, check and choose "update"

Once I installed this components, CMake was able to detect the C/C++ compiler.

Pierre Murasso
  • 591
  • 7
  • 14
0
  • Open developer command prompt from visual studio tools.
  • reach to the directory where your cmake exe resides.
  • Run it.
  • Hopefully, now it will find the c and cxx compiler and run as desired.
Asif Kazmi
  • 21
  • 2