在Windows 10中尝试在VS代码中使用cmake时,我收到以下错误。
-- 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!
尝试实施Cmake Compiler Issue中给出的建议 但是给出了以下输出:
CMake Error: Could not create named generator MINGW Makefiles
后面是生成器建议列表。 很抱歉将其发布为一个新问题,因为我没有足够的代表在同一个链接上发表评论。有什么建议可以解决吗?