Automatic Object Linkage, with Include Graphs -- Thomas Young

For C++ code-bases with multiple targets and shared code elements, static libraries are kind of the default approach, but is there a better way to set this up?

Automatic Object Linkage, with Include Graphs

by Thomas Young

From the article:

In this post I describe an alternative approach to sharing source code elements between multiple build targets.

 

...

We'll need to enforce some constraints on the way the source code is set up, notably with regards to header file organisation, but can then automatically determine what to include in the link operation for each build target, based on a graph of include relationships extracted from the source files.

The resulting dynamic, fine grained, object-file centric approach to code sharing avoids the need for problematic static library decomposition, and the associated 'false dependencies'.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.