I want to compile a simple C program with GCC. What do I need to put in the sublime-build file to do so?
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- glDrawElements only draws half a quad
- Index of single bit in long integer (in C) [duplic
- Equivalent of std::pair in C
In windows, compile and run, with file_regex
LINUX! COMPILING AND RUNNING IN TERMINAL, LANGUAGE C
Create a new Build System and paste this code:
:D
For Mac
}
For windows
The configuration files above make you input data in the terminal(Mac) or cmd(windows),the output also was shown in the terminal or cmd。
The accepted answer did not work for me.
What I did is the following:
Setting
shell
totrue
means it reads thecmd
as one line, so I call make to compile and then run the script. The other option is to haveshell
set tofalse
but you're unable to run multiplecmd
. So the only way I got it to work was have it make the file withCMD + B
and then run it withCMD + Shift + B
:Mac OS X:
Windows: