i have a problem, i have no internet, so i can’t install an extension to do this:
-Compile a C++ script
-Open the executable
-Move it into a folder called Output
-All of this in the external terminal that eventually closes
instead i have to use the tasks.json of VSC but it doesn’t work as I hope
i’ve been watching a lot of tutorial but none of them match my problem, i’m not a expert using the tasks.json because i haven’t had the need to do it so far and this is what i got:
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "C:\path\to\g++.exe",
"args": [
"-Wall",
"-g3",
"${file}",
"-o",
"${fileDirname}\Output\${fileBasenameNoExtension}.exe"
],
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"shell": {
"executable": "cmd.exe",
"args": [
"/C",
"start",
"cmd.exe",
"/K",
"${fileDirname}\Output\${fileBasenameNoExtension}.exe"
]
}
}
}
]
}
the tasks just open the executable if it exists, and then is a normal terminal without closing or making a pause, so i must close it, and because of this, it doesn’t update the executable if i change the script.
then, if i remove the “options” part, the tasks compile successfully and create an executable file. however, the executable doesn’t launch, and there’s no external terminal window either. but here at least the executable is updated.
i would really appreciate it if someone could help me, as it’s frustrating to have to delete part of the tasks file and then paste it back in to see if the script worked.