Interesting overview of the three main techniques to approach C/C++ portable builds.
This tutorial is about building a typical C/C++ Linux project, an application linked against one static library and one shared library, using three different compilation methods: Makefiles, Autotools and CMake. A complete source code is available for download.
This tutorial is meant as a short technical guide for beginners looking for ready-to-use basic samples that they can easily study, understand and extend.
The typical C/C++ project is composed of an application, a shared library and a static library respectively coded in helloworld, helloshared and hellostatic folders.
The three compilation methods are illustrated as the following figure:
Each folder (the name is self-explanatory) refers to a compilation method and contains two scripts hello_clean_all.sh and hello_build_all.sh that can be called to, respectively, clean and build each project from scratch. The main.cc, helloshared.h, helloshared.cc, hellostatic.h, hellostatic.h source and header files are identical in all folders. Theses projects also…
View original post 543 more words