Boost logo

Boost :

Subject: Re: [boost] version conflicts: is there a solution?
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2009-06-28 16:24:05


At 12:49 AM +0000 6/24/09, Lewis Hyatt wrote:
>Let's say I want to compile and distribute a library (without the
>source), and I
>happen to use some boost header-only libraries as an implementation detail in
>some of my functions. None of the headers associated with my library include
>boost headers; it's purely an internal detail.
>
>Now, it seems to me that users of my library will still have to be
>aware of the
>fact that I used boost in my implementation -- specifically, if they happen to
>use different versions of the same boost libraries in their code, then the ODR
>is violated and the behavior is undefined.

I recently dealt with a similar situation by using a linker version script
that marked all of the boost related symbols in the library as local. See
the binutils documentation for ld's --version-script option. Of course,
this is gnu tool-chain specific, which may or may not be useful to you.


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