Published on November 20th, 2019
For compiling C programs you’ll have to use either
gcc or clang. Both
produce almost identical results so it doesn’t really matter which one
you choose for exploring and hobby usage. This post will use
You most likely have
gcc already installed. Try running this command
If you get command doesn’t exist or similar error, try to install gcc using guide from its website.
This will compile binary in same folder that you can actually run.
Programs made from multiple files can also be compiled.
gcc file_1.c file_2.c file_3.c
Also, you can change name of compiled program with
gcc your_program.c -o another_name