Boost logo

Boost :

Subject: Re: [boost] [atomic] boost.atomic library/win32
From: Jürgen Hunold (jhunold_at_[hidden])
Date: 2012-08-10 13:37:39


Hi,

On Thursday, 9. August 2012 14:26:17 Lars Viklund wrote:
> On Thu, Aug 09, 2012 at 01:31:46PM +0200, Tim Blechmann wrote:
> > hello helge,
> >
> > the shared library of boost.atomic on msvc is currently not really
> > usable, as it does not export the pool_.
> >
> > atm, all boost.lockfree tests of msvc fail for this reason. also
> > according to Zao on irc, it will need some specific treatment to avoid
> > the compilation of a static library.
> >
> > [1] http://www.boost.org/development/tests/trunk/developer/lockfree.html
>
> The rites I had to perform to get Atomic to build in a way that it was
> usable as a DLL was:

[snip necessary steps]

> In detail/lockpool.hpp, decorate the lockpool class as:
> class BOOST_ATOMIC_DECL lockpool
> and move the member functions that touch pool_ into lockpool.cpp, to
> avoid them from getting inlined in consumers.

Please find an alternative patch attached. You only have to explicitly export
the "pool_" variable. No further changes are required.

> As a side note, if Boost.Atomic is supposed to be a compiled library, it
> should probably implement autolinking as per [3].

Copied and pasted into detail/config.hpp, but not tested.

Okay to commit? Any other ideas?

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold  ! 
* voice: ++49 4257 300       ! Fährstraße 1
* fax  : ++49 4257 300       ! 31609 Balge/Sebbenhausen
* jhunold_at_gmx.eu             ! Germany



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