Last active
March 7, 2022 18:29
-
-
Save trhgquan/a82f744fba33dd29463d28b99f22d993 to your computer and use it in GitHub Desktop.
VSCode C++ tasks.json to compile multiple .cpp files inside a project, output to main.exe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "cppbuild", | |
"label": "C/C++: g++.exe build active file", | |
"command": "C:\\MinGW\\bin\\g++.exe", | |
"args": [ | |
"-fdiagnostics-color=always", | |
"-g", | |
"${workspaceFolder}\\*.cpp", | |
"-o", | |
"${fileDirname}\\main.exe" | |
], | |
"options": { | |
"cwd": "${fileDirname}" | |
}, | |
"problemMatcher": [ | |
"$gcc" | |
], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
}, | |
"detail": "compiler: C:\\MinGW\\bin\\g++.exe" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment