The usual way to build application is using one of the "Tools -> Build System" templates for your source code language, that neither always work without edit and creating a new requires understand how Sublime build script works. So why not use the good old Makefile to deal with this? just call it from the Sublime script! Go to "Tools -> Build System->New Build System" and replace the new script with this:
{
"working_dir": "${file_path}",
"cmd": ["make"],
"variants":
[
{
"working_dir": "${file_path}",
"name": "Run",
"cmd": ["./a.out"]
}
]
}
Now if you build the application (Ctrl + B), the command 'make' will be executed in the source file directory, and if you run it (Ctrl + Shift + B), the 'a.out' binary will be executed.
0 comentários :
Post a Comment