Hmmm I can't find it either but I know it must be possible. Robert?
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
On Wed, Feb 11, 2009 at 6:13 AM, Jeff Flinn
Emil Dotchevski wrote:
BOOST_CLASS_EXPORT relies on global objects' constructors to register the necessary types, however the C++ standard allows a compiler to strip away such objects unless they are actually used.
The C++ standard guarantees that all global objects contained in a compilation unit (a CPP file) are initialized by the time execution enters a function from that compilation unit. So, if execution never enters a function from that compilation unit, the compiler is allowed to deadstrip it.
You have 2 options:
1) tinker with your code to trick the compiler into leaving in (not deadstripping) the automatic BOOST_CLASS_EXPORT registration (which is usually possible), or
2) register the classes explicitly (not automatic, but guaranteed to work)
I can't find 2 in the docs, Can you point me to where to find it?
Thanks, Jeff
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users