I found this build configuration online:
{
"cmd": ["C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/g++", "-o", "${file_path}/${file_base_name}.exe", "-static-libgcc", "-static-libstdc++", "${file_path}/${file_base_name}.cpp"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.cpp",
"shell": true,
"variants":[
{
"name": "Run",
"cmd": ["start","cmd", "/K" , "$file_base_name"]
}
],
}
Is there any way to AUTOMATICALLY run the .exe program after it gets built rather than separately using CTRL+B to build and CTRL+SHIFT+B to run?
I tried this:
{
"cmd": ["C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/g++", "-o", "${file_path}/${file_base_name}.exe", "-static-libgcc", "-static-libstdc++", "${file_path}/${file_base_name}.cpp"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.cpp",
"shell": true,
"cmd": ["start","cmd", "/K" , "$file_base_name"]
}
But it only displays the older .exe file rather than the newly built one.