欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vscode 编译cpp 时 task.json

程序员文章站 2022-06-22 17:06:07
...
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell", 
			"label": "C/C++: g++ build active file",
			"command": "g++",
			"args": [
				"-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe"
			],
			"options": {
				"cwd": "${workspaceFolder}"
			},
			"problemMatcher": [
				"$gcc"
			],
			"group": "build",
			"detail": "compiler: g++",
		}
	]
}

 

相关标签: CPP vscode