One of my favourite classes at the moment is the one where they teach us C. Knowing C already, it is a nice relaxation for Monday morning.
We usually build small C programs that one can compile straight from the command line. This involves calling the GCC compiler with some arguments and then running the program. I therefore built myself a small script that can do this automatically. It will run under Mac OS or Linux.
You can download the build.sh file and put it to a folder that contains your .c file. The script can then be used by running
./build.sh myFileName
where myFileName is name of the .c file without its extension.
The compiled program will be placed into a newly created 'build' folder and called myFileName.out by default. You can change the output file name by using
./build.sh myFileName myOutputFileName
where myOutputFileName is a file name without its extension.
{Please enable JavaScript in order to post comments}