Boost logo

Boost Users :

Subject: [Boost-users] [serialization][1.42.0] gcc(4.01)/xcode(3.1.2) failure to register type
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-05-04 13:54:55


I've followed the doc's 'Static Libraries and Serialization' approach.
To move the serialize implementation from the header to the cpp file for
my classes in my hierarchy which are serialized through base class
pointer. Which runs on MSVC8, after linking with /OPT:NOREF.

Unfortunately the BOOST_CLASS_EXPORTxxx facilities appear to be
optimized away on gcc/xcode, even though all of the 'strip' settings are
off. What approach are others taking to resolve this? Robert's reply to
Emil Dotchevski on Sep 25, 2008 suggests that explicitly calling
ar.register(static_cast<myType *>(0)); is the only portable way to
ensure registration, is this still the case? Should explicit
registration be done in combination with or en lieu of
BOOST_CLASS_EXPORTxxx?

Thanks, Jeff


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