Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] conflicting declaration(BOOST_CLASS_EXPORT)
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-09-18 18:23:47


try the following re export:

a) re-read the manual regarding boost class export
b) Try using BOOST_CLASS_EXPORT only once.

Robert Ramey

jens weller wrote:
>> Hi,
>>
>> I just had this similar error today, but it took me quite a few
>> minutes to build a working "example".
>>
>> I'll start off with the error(s):
>> L:\project\serializationtest\Mixed.hpp:27: error: conflicting
>> declaration 'const
>> boost::archive::detail::guid_initializer<Mixed>&<unnamed>::boost_serialization_guid_initializer_27'
>> L:\project\serializationtest\Child.hpp:27: error:
>> '<unnamed>::boost_serialization_guid_initializer_27' has a previous
>> declaration as `const
>> boost::archive::detail::guid_initializer<Child>&<unnamed>::boost_serialization_guid_initializer_27'
>> L:\project\serializationtest\Mixed.hpp:27: error: type mismatch with
>> previous external decl of `const
>> boost::archive::detail::guid_initializer<Mixed>&<unnamed>::boost_serialization_guid_initializer_27'
>> L:\project\serializationtest\Child.hpp:27: error: previous external
>> decl of `const
>> boost::archive::detail::guid_initializer<Child>&<unnamed>::boost_serialization_guid_initializer_27'
>> L:\project\serializationtest\Mixed.hpp:27: error: declaration of
>> `const
>> boost::archive::detail::guid_initializer<Mixed>&<unnamed>::boost_serialization_guid_initializer_27'
>> L:\project\serializationtest\Child.hpp:27: error: conflicts with
>> previous declaration `const
>> boost::archive::detail::guid_initializer<Child>&<unnamed>::boost_serialization_guid_initializer_27'
>>>> === Build finished: 6 errors, 0 warnings ===
>>
>> This is my class structure:
>>
>> Base
>> Child : Base
>> Mixed : Base or #include "Base.hpp" is actually enough.
>>
>> Easy, but maybe its already a hint to the problem. The "original"
>> Class structure in my app is far more complex, so I just will refer
>> to my little example, as I guess its the same source some how.
>> I tend to believe that the problem resides somewhere in the Macro
>> BOOST_CLASS_EXPORT, as the compiler points to this.
>> I'm working on Windows XP, with MinGW and the latest (Monday) SVN
>> Build of boost. (as serialization is in 1.36 partly broken
>> afaik/imho).
>>
>> I'll attach my code.
>>
>> So, how to resolve this?
>>
>> regards
>>
>> Jens Weller
>>
>
>
>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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