This page provides basic examples of C/C++ compilation and linking. The objective is to provide a quick (although not complete) tour of how to organize code.
First Scenario: Without Libraries
The Scenario
Compiling each part
Linking and running
Second Scenario: Using Static Libraries
Creating the library
Linking and running
Third Scenario: Using Dynamic Libraries
Creating the library
Linking and running
Fourth Scenario: Using Dynamic Modules
Much like dynamic libraries, but each module is made into a shared object.
Creating shared objects
Linking and running
Fifth Scenario: Using Run-time Dynamic Modules
There is no explicit dependency between modules: symbols are used as strings.
Sample application