Skip to content

Instantly share code, notes, and snippets.

@Roger-WIN
Last active July 9, 2022 15:47
Show Gist options
  • Select an option

  • Save Roger-WIN/8114dec3f014af5b931e2672bfa5b776 to your computer and use it in GitHub Desktop.

Select an option

Save Roger-WIN/8114dec3f014af5b931e2672bfa5b776 to your computer and use it in GitHub Desktop.
Build C++ in VS Code using Clang from MSYS2
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++.exe build active file",
"command": "C:/Program Files/MSYS2/mingw64/bin/clang++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${workspaceFolder}/*.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.exe",
"-Wall",
"-std=c++17"
],
"options": {
"cwd": "C:/Program Files/MSYS2/mingw64/bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "silent",
"showReuseMessage": false,
"clear": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment