0

While trying to use cmake in VS code in Windows 10, I'm getting the below error.

-- The CXX compiler identification is GNU 7.1.0
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_6ab99\fast"
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- broken
CMake Error at C:/Downloaded Applications/CMake/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):
  The C++ compiler

    "C:/MinGW/bin/g++.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/IDEs&Programs/GitnVSCode/Example/CMakeFiles/CMakeTmp

    Run Build Command:"nmake" "/NOLOGO" "cmTC_6ab99\fast"
    The system cannot find the file specified
    Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_6ab99\fast"

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!

Tried implementing the suggestions given in Cmake Compiler Issue but gives the below output :

CMake Error: Could not create named generator MINGW Makefiles

Followed by a list of generator suggestions. Sorry for posting it as a new question since I dont have enough rep to comment on the same link. Any suggestions to solve it?

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
Kris
  • 32
  • 7
  • Do you actually have a complete and working MinGW build environment installed? Ie. you are able to build a hello-worldish C++ project from a handwritten Makefile in the MinGW console? – ComicSansMS Jan 12 '18 at 08:03
  • 3
    It's actually "MinGW Makefiles". The upper-/lower-case is important. – Florian Jan 12 '18 at 08:09
  • @Florian Oh ya, that was a mistake. It works now. Thanks for pointing it out. – Kris Jan 13 '18 at 21:57

0 Answers0