MinGW官网
划到最下面找
解压后放到自己想放的目录下
右键 此电脑–>属性–>高级系统设置—>环境变量–>
gcc --v
首先下载插件:一共三个
然后配置 c_cpp_properties.json
使用UI界面配置如下:ctrl + shift + p 打开命令面板,输入c /c++,选择 Edit Configurations(UI)
或者打开 c_cpp_properties.json文件配置
复制下来覆盖原来的,修改 compilePath 字段所对应的路径即可
{
"configurations": [
{
"name": "Win32",
"includePath": ["${workspaceFolder}/**"],
"defines": ["_DEBUG", "UNICODE", "_UNICODE"],
"compilerPath": "D:\\Vscode\\Microsoft VS Code\\environment\\C\\MinGW\\bin\\g++.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x86",
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}