Sublime Forum

C builds in Sublime Text 4


How can I build a C program in Sublime Text 4?



This is a rather open ended question; are you trying to build a single file? multiple files? Are you using some sort of build management tool like make or ninja? More details are required to be able to provide assistance.

In the general case, Sublime comes with a build system for compiling and running a single file C or C++ program; if you have gcc/g++ installed, you just need use Tools > Build System > Automatic from the menu, and then choose Tools > Build With while you have a source file open and pick the option that says C Single File to build the code or C Single File - Run to build and then run it.