Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-08-14 12:40:29


I believe that this has been addressed in 1.36. So I believe when(if) you
move to
1.36, your "unofficial" patch will be replaced with the "official" one.

Robert Ramey

Paul Wais wrote:
> Dear List,
>
> I am writing to request advice about a compile error possibly related
> to the BOOST_CLASS_EXPORT_GUID macro under Boost 1.35 and Visual
> Studio 2005. I unfortunately cannot share much about the cause of the
> error and was hoping to query the community to see if anybody else has
> had similar difficulties. In particular, it seems at least one other
> developer has had a similar problem, as described in the blog post:
> http://www.alexmccarthy.net/archives/2008/06/16/upgrading-to-boost-135
>
> The problem in question involves a library we wrote that uses basic
> features of Boost Serialization for marshaling objects to XML. The
> library compiles and runs successfully on Linux (gcc version 4.2.3
> Ubuntu 4.2.3-2ubuntu7). When compiling the same code on a
> properly-configured Windows machine using Visual Studio 2005, we
> observe the following compile errors:
>
> C:\Boost\include\boost-1_35\boost/serialization/type_info_implementation.hpp(48)
>> error C2027: use of undefined type
> 'boost::serialization::extended_type_info_impl<T>'
> with
> [
> T=boost_time
> ]
> C:\Boost\include\boost-1_35\boost/serialization/export.hpp(75)
>> see reference to class template instantiation
> 'boost::serialization::type_info_implementation<T>' being compiled
> with
> [
> T=boost_time
> ]
> .\ConstraintSystem/Time/boost_time.h(159) : see reference to
> class template instantiation
> 'boost::archive::detail::guid_initializer<T>' being compiled
> with
> [
> T=boost_time
> ]
> C:\Boost\include\boost-1_35\boost/serialization/type_info_implementation.hpp(49)
>> error C2146: syntax error : missing ',' before identifier 'type'
> C:\Boost\include\boost-1_35\boost/serialization/type_info_implementation.hpp(49)
>> error C2065: 'type' : undeclared identifier
> C:\Boost\include\boost-1_35\boost/serialization/type_info_implementation.hpp(50)
>> error C3203: 'identity' : unspecialized class template can't be used
> as a template argument for template parameter 'F2', expected a real
> type
> C:\Boost\include\boost-1_35\boost/serialization/type_info_implementation.hpp(50)
>> error C2955: 'boost::mpl::identity' : use of class template requires
> template argument list
> C:\Boost\include\boost-1_35\boost/mpl/identity.hpp(26) : see
> declaration of 'boost::mpl::identity'
>
> .
> .
> .
>
> (dozens of similar errors follow)
>
>
> The owner of the aforementioned blog suggests to add the line:
> #include <boost/serialization/extended_type_info_typeid.hpp>
>
> to the file:
> boost/serialization/export.hpp.
>
> We have done that and our compile errors go away. Though this fix
> seems to work for our needs, we endeavor to keep the copy of our Boost
> library free from unofficial patches.
>
> Might anybody have similar troubles? Might there be an "official" fix
> to this problem?
>
> Thank you for your time and I greatly appreciate any help on this
> issue.
>
> Best Regards,
> -Paul Wais


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