0

I am trying to install slycot and I get the following issue.

The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH

I downloaded Visual Studio 2019. I tried to run "CMake" from a VS command prompt, but nothing happens.

I have found the vcvarsall.bat file location in the VS folder, but I do not know what to do with it. Would anyone be so kind to tell me what to do next? (I am new to scripting, so please be explicit).

Thanks

Francesco
  • 111
  • 9
  • Consider looking at this [stackoverflow question](https://stackoverflow.com/questions/31262342/cmake-g-ninja-on-windows-specify-x64/66467752#66467752), better yet look at my answer :D –  Mar 31 '21 at 00:59

1 Answers1

1

Normally cmake uses the program vswhere.exe to detect your VS2019 installation. But sometimes this seems not to work. You can run the

vcvarsall.bat Win64 

to setup the environment variables in the command prompt. How to find the path to it can be found here. And I am pretty sure the script vcvarsall.bat will show you the option when calling it without a parameter.

KimKulling
  • 2,654
  • 1
  • 15
  • 26
  • Thanks for your answer. When I run the "vscall.bat Win64 " I get the following: " 'vscall.bat' is not recognized as an internal or external command, operable program or batch file." – Francesco Mar 29 '21 at 20:54
  • 1
    Search for "x64 developer command prompt" in the start menu. It runs this command implicitly. – Alex Reinking Mar 30 '21 at 23:30
  • And after calling cmake in this prompt the cmake issue will not come back. I don't know why. – KimKulling Mar 31 '21 at 06:02