3

This is the first time I've come across CMake. When I follow CMake instructions to extract a C# project, it give the below error.

Selecting Windows SDK version  to target Windows 10.0.15063.
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
  No CMAKE_C_COMPILER could be found.

CMake Error in CMakeLists.txt:
  No CMAKE_CXX_COMPILER could be found.

I tried to fix the error by googling, but not able to find the problem yet. Can someone please help me.

Note: I am running CMake on a Windows 10 computer, that has Windows 8.1 SDK, Visual studio 2015, 2017 installed.

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
Vignes
  • 241
  • 1
  • 3
  • 5
  • Have you read [this question](https://stackoverflow.com/questions/31619296/cmake-does-not-find-visual-c-compiler) and answers for it? Which answer(s) have you tried? – Tsyvarev May 11 '18 at 08:38

1 Answers1

1

I was having the same issue with a very similar system configuration. In my case, it appears to have been related to this question which pointed me to this bug report.

So the fix (for me) was to update CMake:

  1. Uninstall your current version of CMake.
    If you installed it using an installer script, you'll need to run the uninstaller as noted on CMake.org.

    Installer tool has changed. Uninstall CMake 3.4 or lower first!

    If you installed a zipped portable version, you can simply delete it and/or move it out of your PATH environment variable.

  2. Download the latest CMake (at time of writing, 3.14.5). This time I opted to install the zipped version and manually add it to my PATH environment variable since I only ever use CMake from command prompt anyway, but you're welcome to use the MSI instead.

And after that everything worked fine! Hope this helps.

sbseltzer
  • 164
  • 7