Cpp
Compiling and Running C and C++
You’ll be coming across a lot of software written in C and C++, and it’s useful to have a primer on how to build and run it. This is true even if you’re not writing your own software in these languages. There are various build systems for these languages, and we’ll need to take a quick look at all of them.
Invoking gcc
or clang
manually.
For projects with a single source file, or perhaps a small number of them, it is fine to invoke the compiler manually.
If you want to play with this, see the article What You Need To Know About C and
creating the three files test.h
, test.c
, and main.c
in an empty directory.