Boost Users :
Subject: Re: [Boost-users] [boost 1.39][Serialization] BOOST_CLASS_EXPORT_GUID macro failed to compile with C2888 error under MSVS.
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-05-15 16:13:11
Check the documentation regarding BOOST_CLASS_EXPORT and the best place to
Vitaly Dolya wrote:
> Hi, All!
> Since I had no answer on my previous post, I'll try to clarify the
> problem here. So, I use a macro BOOST_CLASS_EXPORT_GUID from
> library. And everything was just fine until boost 1.39 came up to stage
> recently. Now the same very of my code, I've been using for so long
> with boost 1.35 I guess), failed to compile under MS Visual Studio
> 2008 SP1. Compiler gives me an error
> error C2888:
> : symbol cannot be defined within namespace 'anonymous-namespace'.
> The error occurs when export.hpp file (contains
> BOOST_CLASS_EXPORT_GUID) is included to stdafx.h (to precompiled headers)
> and the macro is used
> in any other cpp-file. I guess the problem is that 'init_guid'
> structure declaration (declared inside anonymous namespace) and definition
> appear in different translation units.
> So, it looks like there is a bug in boost 1.39 to me. Am I right?
> And what should I do? Should I file a bug?
> Thanks in advance.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net