Sublime Text 4, no console output

61 Views Asked by At

Sublime Text

I am trying to setup sublime text editor for the first time. The build system manages to compile the code into an executable file, but there is no output in the sublime text console / terminal, the console only prints out execution time. When you run the created .exe file in windows cmd, it prints out the Hello World.

Build system:

{
    "cmd": ["clang.exe", "-std=c17", "${file}", "-o", "${file_path}/${file_base_name}.exe"],
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c",

    "variants":
    [
        {
            "name": "Run",
            "cmd": ["clang.exe", "-std=c17", "${file}", "-o", "${file_path}/${file_base_name}.exe"]
        }
    ]
}

Code:

#include <stdio.h>

int main() {
   
   printf("Hello, World!");
   return 0;
   
}

Expecting to see: "Hello, World!" in the sublime text console after build & run.

Result / Screenshot

I am running out of ideas, youtube videos and stackoverflow pages to solve this problem. Should the console print the code out of the box or is this unusual? I suspect that anything wrong in the build system could break some functionality.

0

There are 0 best solutions below