I'm learning C language. I'm referring book by Dennis Ritchie & Kernighan. And there fore Just ANSI complaint programs. I've installed ANSI compiler. I just installed Sublime text 2 editor. Could someone give me a build system that would do the following.
1) Compile my source file
2) Display error (in well formatted manner) within sublime on unsuccessful compilation.
3) On successful compilation, Generate binary file with name same as the Source file name within my working directory.
4) Accept Any user input within sublime to calculate Output. (Since i'm a beginner i mostly write programs that would ask the user to input. ex: Program to calculate number of characters in user input name.)
5) Separate selection for Compile & run.
Thanks in Advance.
See the status bar down in sublime text 2 where it says the language or it says 'plain text', click it and search for 'c' language. to build you just need to save
Ctrl-s
and BuildCtrl-B
, Easy as cake!. also you could try a C friendly IDE like Eclipse. http://www.eclipse.org/From menu, choose Build -> New build system ... and copy-paste this:
Windows
Compile Only:
Compile & Run:
Linux
Compile Only:
Compile & Run:
and save this with extension *.sublime-build
ST just is a editor, so you cannot use it as a input stream, you have to use a shell like bash, zsh, ... to do it.