1.其他大佬的配置:下载和安装库环境
2.安装好C/C++插件<选择1.8.4的版本最好>。
3.分别生成对应的默认模板即可。但是其中参数可能需要配置。
task.json
cpp
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/nologo",
"/Fe:",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: cl.exe"
}
]
}
launch.json
cpp
{
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [
],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console":"integratedTerminal"
},
],
"preLaunchTask": "C/C++: cl.exe build active file"
}