CMake cannot identify C compiler from installed Visual Studio 2015

I try to install CMake for vtk, but I get this error message:

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

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

Screenshot

+4
source share
3 answers

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

Basically, VS2015 does not install Cx compilers by default. Creating a C ++ project in VS2015 will force VS to load the necessary compilers.

+4
source

here is what worked for me:

  • Debug Visual Studio 2015 installation
  • Choose edit
  • , : " Visual ++ 2015" " Windows XX SDK"
  • , ""

, CMake C/++.

+1
  • Open the developer command line using visual studio tools.
  • get to the directory where your cmake is located.
  • Run it.
  • Hopefully now he finds the c and cxx compiler and starts as desired.
0
source

Source: https://habr.com/ru/post/1609989/


All Articles