Skip to content

Instantly share code, notes, and snippets.

@pqviet07
Last active April 8, 2023 14:18
Show Gist options
  • Save pqviet07/3e4fc0a7deb30f5e3207a10d64cede05 to your computer and use it in GitHub Desktop.
Save pqviet07/3e4fc0a7deb30f5e3207a10d64cede05 to your computer and use it in GitHub Desktop.
Task.json for compile c++ with Boost Library for vscode
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++.exe build active file with boost lib",
"command": "g++",
"args": [
"-g",
"${file}",
"-o",
"${fileBasenameNoExtension}.exe",
"-I",
"C:\\Boost\\include\\boost_1_76_0",
"-L",
"C:\\Boost\\include\\boost_1_76_0\\stage\\lib"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "shell",
"label": "C/C++: g++.exe run & build active file",
"command": "${fileBasenameNoExtension}.exe",
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": [
"C/C++: g++.exe build active file with boost lib"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment