Boost Testing :
Subject: Re: [Boost-testing] serialization tests on msvc in develop
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-11-12 10:55:04
On 11/12/15 3:07 AM, John Maddock wrote:
> On 11/11/2015 21:41, Robert Ramey wrote:
>> I've been having a heck of a time getting the right "visibility"
>> attributes set for all environments in the serialization library.
>> The library doesn't build on msvc and an attempt to retrieve the syntax
>> error retrieves a long message. The message gets truncated before
>> reaching the good part.
>> People have helped me in the past - please don't stop now.
> This one I don't understand, in:
> void wchar_from_mb<Base>::drain(),
> the assertion:
> BOOST_ASSERT(std::codecvt_base::ok == r);
> Fails as the result of the conversion is "partial".
> With regard to the dll build issue: there are a whole bunch of files
> where you include #include <boost/serialization/config.hpp> *before*
> setting BOOST_SERIALIZATION_SOURCE. As a result
> BOOST_SERIALIZATION_DECL is set to dllimport before
> BOOST_SERIALIZATION_SOURCE is ever defined. You need to make sure
> #define BOOST_SERIALIZATION_SOURCE is right at the top of all the source
> files - before any #includes.
I'm not sure that it's that simple.
code in wserialization.dll makes calls in serialization.dll. So the
#includes for imported functions have to be be fore the "SOURCE"
statements. I originally did this a number of years ago and don't
remember whether or not it was painful. I recently mucked things up on
implementing the "visibility" features of gcc and clang. So now I'm
dependent on three subtlely different sets of rules. I know they are
all similar but slightly different so it means experimentation to get it
right. And of course I no longer have an MSVC compiler at my ready
disposal. And of course this isn't helped by the fact that when the
library fails to build on the boost test matrix - the error messages are
> HTH, John.