I would like to know if I can add a compiler to the sublime to compile things straight from the program, more practical as well.
I would like to know if I can add a compiler to the sublime to compile things straight from the program, more practical as well.
How do you compile your programs? Do you have any environment variables referencing a binary to run on the command line ? Since Sublime Text 3 has an area called builds , from which you can run commands building section of your application.
I'm not a C ++ developer but I use Sublime builds daily working with Node.js, so I think it's the same process. For now, I'll explain how building works using Node.js simply because it does not have a C ++ environment installed. When you can answer those questions from the beginning, I can then update this answer with the appropriate information.
I believe Sublime has opened a new file with the .sublime-build
extension that should be saved inside ./Packages/User/
. Here are the file settings:
{
"shell_cmd": "node $file"
}
Note that where% is% must be the environment variable of your machine referencing the binary responsible for compiling your scripts C ++ and the parameter
node
is a reference for the current program that will be compiled.
$file
. Go to Sublime > Tools > Build System > that was previously saved When you want to compile your programs, press ./Packages/User/
.
IMPORTANT : Sublime does not "kill" the process, even if you press
Ctrl + B
orCtrl + C
building will continue to run in background . If you want to end the process, go to Sublime > Tools > Cancel Build (a.k.aEsc
).
I'm currently using Windows so the terminologies I used were based on my OS. If you are using another system I think you will have to search for "interwebs" about how to configure them.