Sublime Forum

Sublime C++ build system

#1

Hello, I’m using sublime script for cpp building that looks like this:

{
"cmd": ["g++.exe", "${file}", "-o", "${file_path}/${file_base_name}.exe", "&&" , "start","${file_base_name}.exe"],
"shell":true
}

Works fine in general but is there any way to make console stay after program is finished, as now it automatically closes after program ends.

Tried adding “/K” and “Pause” to this script but it either bricks it or just doesn’t work

0 Likes

#2

If you are on windows, replace your “start” by a “cmd”,"/k"

0 Likes

#3

Unfortunately doesn’t work. building still works fine but it doesn’t run the program now.

0 Likes

#4

You should use the shell_cmd key and provide the command as a string for the “shell” instead of using the deprecated shell key. See if that’s enough to make it work.

0 Likes