VSCode 报错
2021/6/2 18:29:46
本文主要是介绍VSCode 报错,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
vscode报错
Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
解决办法:
1、首先确认安装了gcc make cmake
mingw64/mingw-w64-x86_64-gcc
mingw64/mingw-w64-x86_64-make
mingw64/mingw-w64-x86_64-cmake
2、通过Ctrl + Shift + P 打开 settings.json,输入并选择
Preference: Open settings (JSON)
然后添加以下内容:
"cmake.cmakePath": "C:\\msys64\\mingw64\\bin\\cmake.exe", "cmake.mingwSearchDirs": [ "C:\\msys64\\mingw64\\bin" ], "cmake.generator": "MinGW Makefiles"
3、通过Ctrl + Shift + P 然后输入 CMake: Edit User-Local CMake Kits
, 就会打开 cmake-tools-kits.json
。这时候输入:
{ "name": "Mingw64 GCC 9.3.0", "compilers": { "C": "C:\\msys64\\mingw64\\bin\\gcc.exe", "CXX": "C:\\msys64\\mingw64\\bin\\g++.exe" }, "preferredGenerator": { "name": "MinGW Makefiles", "platform": "x64" }, "environmentVariables": { "PATH": "C:/msys64/mingw64/bin/" } }
外文链接:https://github.com/microsoft/vscode-cmake-tools/issues/880、
如果有帮助请点赞
这篇关于VSCode 报错的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-27Excel中实现拖动排序的简单教程
- 2024-11-27Rocket消息队列资料:新手入门指南
- 2024-11-27rocket消息队资料详解与入门指南
- 2024-11-27RocketMQ底层原理资料详解入门教程
- 2024-11-27RocketMQ项目开发资料:新手入门教程
- 2024-11-27RocketMQ项目开发资料详解
- 2024-11-27RocketMQ消息中间件资料入门教程
- 2024-11-27初学者指南:深入了解RocketMQ源码资料
- 2024-11-27Rocket消息队列学习入门指南
- 2024-11-26Rocket消息中间件教程:新手入门详解