How can i Compile a C program on Dos prompt using tcc and tc

Sumeshsankar picture Sumeshsankar · Nov 24, 2009 · Viewed 13.2k times · Source

I want to compile c program on dos prompt using tcc as well as tc without using c editor. please give the full procedure.

Answer

Tim picture Tim · Nov 24, 2009

I would look at the TCC documentation, specifically the quick start guide, provided on the TCC web page. Assuming you have some source code already, a compilation is as simple as

tcc -o executable.exe sourcefile.c

You can also run a C file directly with the -run option, as in

tcc -run sourcefile.c