|
Boost : |
From: m_at_[hidden]
Date: 2005-06-20 15:50:52
Hey all!
Perhaps I should have addressed this directly to Robert Ramey. I'm trying
to use his (great!) serialization library and having trouble getting basic
serialization code to compile, using boost cvs (updated a few minutes
ago). I tried building the examples bundled with the lib and get the same
error as I do with my simple code, when compiling demo_exception.cpp. I'm
pretty new at this, so I wouldn't rule out "user error" of some kind, but
I get the same error under Fedora FC3 and gentoo, and another developer on
#boost has confirmed that they also get the error under Solaris. Here are
my compiler versions:
gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
gcc (GCC) 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1,
pie-8.7.7.1)
Here's the error:
/home/m/development/boost_cvs/boost/boost/archive/detail/oserializer.hpp:543:
error: incomplete type `boost::STATIC_ASSERTION_FAILURE<false>' does not
have member `value'
See below for the full error context.
OK I now see from the mailing list that it's a const problem, that darn
creeping const. :> Still, it looks like the demo code needs updating,
for const* but perhaps more. From Bklyn on #boost...
<reboost> FN: <Bklyn> ok, fix for demo_Exception.cpp:
<reboost> FN: <Bklyn> change the "save" free function so it takes a
School* const instead of School*
<moodboom> cool! :>
<reboost> FN: <Bklyn> the shared_ptr demo is broken tho
<reboost> FN: <Bklyn> its using internals of shared_ptr that no longer
exist I think
<moodboom> ok
TIA for any help,
Michael Behrns-Miller
---------------------------------------------
cd boost/libs/serialization/example
bjam "-sTOOLS=gcc"
...found 1209 targets...
...using 26 temp targets...
...updating 13 targets...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_archive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_archive_impl.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_iarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_oarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_iserializer.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_oserializer.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_pointer_iserializer.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_pointer_oserializer.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_serializer_map.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_text_iprimitive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_text_oprimitive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>basic_xml_archive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>binary_iarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>binary_oarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>extended_type_info.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>extended_type_info_no_rtti.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>extended_type_info_typeid.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>polymorphic_iarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>polymorphic_oarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>stl_port.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>text_iarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>text_oarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>void_cast.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>xml_grammar.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>xml_iarchive.o...
...using
<@boost!libs!serialization!build/libboost_serialization.a/gcc/debug>xml_oarchive.o...
gcc-Archive-action
../../../bin/boost/libs/serialization/build/libboost_serialization.a/gcc/debug/libboost_serialization-gcc-d-1_33.a
system-Ranlib
../../../bin/boost/libs/serialization/build/libboost_serialization.a/gcc/debug/libboost_serialization-gcc-d-1_33.a
gcc-Link-action
../../../bin/boost/libs/serialization/example/demo/gcc/debug/demo
Chmod1 ../../../bin/boost/libs/serialization/example/demo/gcc/debug/demo
gcc-Link-action
../../../bin/boost/libs/serialization/example/demo_auto_ptr/gcc/debug/demo_auto_ptr
Chmod1
../../../bin/boost/libs/serialization/example/demo_auto_ptr/gcc/debug/demo_auto_ptr
gcc-C++-action
../../../bin/boost/libs/serialization/example/demo_exception/gcc/debug/demo_exception.o
/home/m/development/boost_cvs/boost/boost/archive/detail/oserializer.hpp: In
function `void boost::archive::save(Archive&, T&) [with Archive =
boost::archive::text_oarchive, T = School*]':
/home/m/development/boost_cvs/boost/boost/archive/basic_text_oarchive.hpp:78:
instantiated from `void
boost::archive::basic_text_oarchive<Archive>::save_override(T&, int) [with
T = School*, Archive = boost::archive::text_oarchive]'
/home/m/development/boost_cvs/boost/boost/archive/detail/interface_oarchive.hpp:92:
instantiated from `Archive&
boost::archive::detail::interface_oarchive<Archive>::operator<<(T&) [with
T = School*, Archive = boost::archive::text_oarchive]'
demo_exception.cpp:219: instantiated from here
/home/m/development/boost_cvs/boost/boost/archive/detail/oserializer.hpp:543:
error: incomplete
type `boost::STATIC_ASSERTION_FAILURE<false>' does not have member `value'
--------------
(snip)
--------------
...failed updating 3 targets...
...skipped 2 targets...
...updated 8 targets...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk