Difference between revisions of "Quick topics on compiling and linking in C/C++"

From Wiki**3

(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...)
 
Line 1: Line 1:
 +
{{TOCright}}
 
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.
 
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.
  

Revision as of 15:16, 15 March 2010

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