Boost logo

Boost :

Subject: Re: [boost] CMake - one more time
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2016-04-23 15:41:49


On 23 April 2016 at 18:47, Paul Fultz II <pfultz2_at_[hidden]> wrote:

> When linking static and shared libraries together it can lead to a lot of
> complicated problems. You have to make sure the static code is built PIC
> depending on how it needs to be linked together.

That's the least problematic issue you can have indeed, there are others
related to static objects etc.
Nonetheless, in big projects it can be necessary to have some parts as
shared library and others as static library.

If you want to use all boost libraries as static except boost.log because
of it's singleton core object, you need to build boost in both static and
dynamic
and then make sure you link with the right version of each boost library.
This is a concrete example of a project I worked on, where this setup was
necessary to achieve the features of the project.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk