VS code 运行 Cmake 报错 Running 'nmake' '-?' failed with: no such file or directory
Posted on 2024-07-27 01:59 奇点_Singularity 阅读(3969) 评论(0) 收藏 举报在以cmake . 企图运行CMakeLists 时, VS code 报错:
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
经过搜寻大佬们的帖子尝试运行
- 以下命令:
cmake -G "MinGW Makefiles" .
依旧没有解决问题。 - 尝试添加环境变量
Variable: CMAKE_GENERATOR
Value: MinGW Makefiles
依旧没有解决问题。
最后通过此帖子:https://stackoverflow.com/questions/45150172/cmake-error-cmake-was-unable-to-find-a-build-program-corresponding-to-mingw-ma
决定通过卸载mingw64后通过MinGW installation manager重装mingw,并确保勾选mingw32-make
重新运行cmake .(后面笔者发现仍需要运行cmake -G "MinGW Makefiles"指定generator):

Cmake正常运行。
浙公网安备 33010602011771号