Quick topics on compiling and linking in C/C++

From Wiki**3

Revision as of 15:15, 15 March 2010 by Root (talk | contribs) (New page: 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 Li...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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