Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] link error and exception on get_key
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-01-15 02:15:46


I presume you're using the "no rtti" option? get_key used only for those systems which
use which depend on extended_type_info_no_rtti to handle extended_type_info functionality.

with which compiler?, which version of boost?
  "Daniel Roberts" <impulsionaudio_at_[hidden]> wrote in message news:14125aaf0901142057s6ba59d08tc98a6990a5f78bca_at_mail.gmail.com...
  I have a derived class that exports its type and overrides get_key for serialization through a base class pointer. If I move the definition of the overridden get_key function out of the header into a cpp file, an assertion fails on line 49 of extended_type_info.cpp.

  Take a look at the example "test_no_rtti". the class polymorphic_derived has a get_key
  declaration - but the get_key definition is not inline. This would seem identical your case.

  You might want to make a small variation of test_no_rtti such that the definition of
  polymorphic_derived1::get_key defintion is moved to a separate source and verify that
  it builds and runs correctly.

  If I define any other functions in the cpp file, I get a linker error saying that the get_key symbol is already defined. It looks to me that any serializable derived class must be completely defined in the header file. Is this correct?

  If so, why does such a limitation exist?

  I don't think this limitation exists

  Thank you

  Robert Ramey

------------------------------------------------------------------------------

  _______________________________________________
  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