Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization]Multiplydefinedsymbol:guid_initializer
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-04-03 17:07:58


  "Robert Dailey" <rcdailey_at_[hidden]> wrote in message news:496954360904031255o6ddcad4ah7851d7fc6dd70324_at_mail.gmail.com...
  On Fri, Apr 3, 2009 at 3:02 PM, Robert Ramey <ramey_at_[hidden]> wrote:

     "Robert Dailey" <rcdailey_at_[hidden]> wrote in message news:496954360904031054x3cb9f3cfldf1985695a096614_at_mail.gmail.com...
      Also, I'm a bit confused about something else Robert.

      All along we've been saying that if the code in the translation unit is not used, it may be stripped by the linker. What code exactly is being stripped? I mean, I create my classes before I serialize them and I'm calling member functions on these instances. So for sure the translation unit is being "entered" before serialization even begins. Does this not meet the requirements?

      I've been presuming your doing something like:

      base * b = new derived;
      ar << b;

      ....
      base * new_b;

      ar >> new_b; the linker look for the code to load derived.

      Robert Ramey
  What exactly are you trying to say here? Are you saying that only when I stream in does the translation unit for "derived" get visited? Could you provide a bit more detail?

  What I'm doing is more like this:

  base* b = new derived;
  b->DoStuff();
  b->DoMoreStuff();

  **** at this point, the serialization library doesn't necessary doesn't know anything about derived. (I'm assuming derived is polymorphic.) Depending on what is compiled into the library and waht is inline, there may or may not be a problem at link time

  Robert Ramey

  archive << b;

  I haven't actually used >> yet. This is strictly an issue with streaming out.

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

  _______________________________________________
  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