[quote=âagibsonswâ]If you choose the Tools menu, Build System, New Build System you can create a file something like this:
{
"cmd": "javac", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}
I copied this from the default âJavaC.sublime-buildâ file. You can replace âjavacâ with (presumably) âgccâ. If the compiler is not in your environment paths then youâll need to supply the full path to it - but youâll need to escape the back-slashes âC:\something\else\gccâ
â$fileâ means âthe current fileâ. You can probably delete the file_regex line. And your selector will be (presumably) âsource.câ, âsource.cppâ or âsource.c++â. If the same compiler works for both c and c++ you can separate them with commas: âsource.c, source.c++â.
Save this file in your Packages\C++ or \User folder with the extension âsublime-buildâ. You should probably restart ST2 and this new option should appear in the Build list. If you use it once then Ctrl-B will probably default to it in future.
Iâm not sure about arguments; I assume you could bung them in with the $file: â-c -whatever $fileâ. Andy.[/quote]
Thanks agibsonsw for the info⌠What about running the newly build application from sublime editor?
Is there a way to map the errors in the build to the line numbers. I know this is not IDE but having that feature will greatly help in debugging applications.
-Abhijeet