|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-09-11 10:53:09
David Raulo wrote:
>> My initial problem was that I'm using Boost.Serialization on a rather
>> big class hierarchy (around 200 classes),
With a stack trace back i the debugger, you should be able to determine
for which classes code is getting "dropped"
>>so instantiating all the
>> serialization code in a single .cpp is not pratical (too much memory
>> consumed by the compiler). So I split my BOOST_CLASS_EXPORT_GUID()
>> declarations into several compilation units, and this worked fine.
>> *Except* if I generate a static library, in which case I get
>> unregistered class exceptions.
EXPORT assures that code for classes no otherwise referred to doesn't
get "stripped". But if such code is added to a static library, I doubt it
can be guarenteed that its added to the executable. I would guess you'll
have to include a module in among your applications which explicitly
refers to this code so it will be sucked into the executable.
Robert Ramey
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