Re: [Boost-users] problem with serialization of pure virtual

-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Tobias Combe Sent: Tuesday, February 28, 2006 7:18 AM To: boost-users@lists.boost.org Subject: [Boost-users] problem with serialization of pure virtual
When i use "ar.register<derived>();" in the template of the base-class to register the derived classes, i get a syntax error.
[Nat] What compiler are you using?

I'm using gcc 3.3.5 and now i get the following error: with oa << event; : boost/serialization/access.hpp: In static member function `static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = DataNode]': boost/serialization/serialization.hpp:81: instantiated from `void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = DataNode]' boost/serialization/serialization.hpp:140: instantiated from `void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = DataNode]' boost/archive/detail/oserializer.hpp:148: instantiated from `void boost::archive::detail::oserializer<Archive, T>::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::text_oarchive, T = DataNode]' boost/mpl/if.hpp:67: instantiated from here boost/serialization/access.hpp:109: error: `serialize' undeclared (first use this function) boost/serialization/access.hpp:109: error: (Each undeclared identifier is reported only once for each function it appears in.) with //oa << event; : IDSNet/Sensor.o(.text+0x367): In function `Sensor::~Sensor [not-in-charge]()': Sensor.cc: undefined reference to `vtable for Sensor' IDSNet/Sensor.o(.text+0x3c9): In function `Sensor::~Sensor [in-charge]()': Sensor.cc: undefined reference to `vtable for Sensor' IDSNet/Sensor.o(.text+0x42b): In function `Sensor::~Sensor [in-charge deleting]()': Sensor.cc: undefined reference to `vtable for Sensor' IDSNet/Sensor.o(.gnu.linkonce.r._ZTI10PollSensor+0x8): undefined reference to `typeinfo for Sensor' IDSNet/Sensor.o(.gnu.linkonce.r._ZTI10PushSensor+0x8): undefined reference to `typeinfo for Sensor' IDSNet/Sensor.o(.gnu.linkonce.t._ZN6SensorC2Ev+0xb): In function `Sensor::Sensor[not-in-charge]()': Sensor.cc: undefined reference to `vtable for Sensor'
participants (2)
-
Nat Goodspeed
-
Tobias Combe