
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: In build/Jamfile.v2: Augment the project requirements and lib with <link>shared:<define>BOOST_ATOMIC_DYN_LINK=1 <link>static:<define>BOOST_ATOMIC_STATIC_LINK=1 Create boost/atomic/config.hpp as indicated at [2]. 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. As a side note, if Boost.Atomic is supposed to be a compiled library, it should probably implement autolinking as per [3]. I might be off on some things here, but this _should_ make it a good dynamic Boost library. I'm a bit opposed to requiring something to be dynamic however, as that kind of implies that you need a dynamic language runtime. [2] http://www.boost.org/doc/libs/1_50_0/libs/config/doc/html/boost_config/boost... [3] http://www.boost.org/doc/libs/1_50_0/libs/config/doc/html/boost_config/boost... -- Lars Viklund | zao@acc.umu.se