How to compile and run (by a single command) a C++ program manually on MS DOS instead of Borland?

535 views Asked by At

I do this now by running two commands.

C:\TC\Bin>tcc test.cpp
C:\TC\Bin>test

Is there any way to accomplish this by using just one command?

1

There are 1 answers

5
Anonymouse On

As Basile Starynkevitch said you could write a batch file... This version has error checking for compile errors...

@Echo off tcc test.cpp if errorlevel 1 goto FAILED test.exe

:FAILED

As your project gets more complicated consider using MAKEFILE's