You need to copy the file C:\Windows\System32\bash.exeto a directory C:\Windows\SysWOW64\. Required due to the redirection of the WoW64 file system (Thanks Martin !)
Then you need to create a new build system in Sublime Text with the following code. ( Tools -> Build System -> New Build System...)
{
"cmd" : ["bash", "-c", "gcc ${file_name} -o ${file_base_name} && ./${file_base_name}"],
"shell": true,
"working_dir": "${file_path}",
}
This code will compile the .c code and run it. The output will be shown in the Sublime Build Results panel.
If you want to use this build system, select it in the list Tools -> Build System, and then click Ctrl + B.
You can charge the command that I put, the main thing is that you can run linux commands with bash -c "CommandsYouWantToRun"
source
share