1.安装mingw-64
先安装mingw-64的安装包,两种选择,安装包下载或者压缩包下载,链接在这,前提是需要翻墙。安装完之后唯一要做的就是需要配置系统环境。包含子文件下的bin文件。
2.安装插件
vs code插件扩展 上安装 c/c++
配置tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++",
"command": "D:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe",
"args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"],
"options": {
"cwd": "${workspaceFolder}"
},
"pro