So I installed Visual Studio 2017 yesterday. I also installed CMake 3.7.2 which supports VS 2017.
My VS installation is with the Game development with C++
workflow + a few other components:
I've also added the CMake stuff (but I don't think I even needed it - since I'm using CMake as a standalone tool to just generate the VS solutions) and MSBuild (I had msbuild.exe
even before adding that component - so not sure what exactly does that additional component do).
With VS 2015 I was able to just run cmake .
from a normal command prompt for a solution.
With VS 2017 the workflow changes - I've read this post from Microsoft.
So I tried the following:
- I opened the
Developer Command Prompt for VS 2017
and from it I rancmake . -G "NMake Makefiles"
. Then runningcmake --build .
compiled everything properly. When I tried the following in the prompt:
cmake . -G "Visual Studio 15 2017 Win64"
to force the creation of a solution I got the following errors:-- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found. -- Configuring incomplete, errors occurred!
I also tried setting up the environment using vswhere.exe and running vcvarsall.bat
like this:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
and again I could only generate NMake files and not a solution.
So how can I get a solution?
And why does cl.exe
report Version 19.10.25017
when it's in VC\Tools\MSVC\14.10.25017\bin
?