
Zajo wrote:
There is another warning which is missing from the documentation: portable code can not rely on BOOST_CLASS_EXPORT to register a class unless the user explicitly calls a function from a compilation unit that "sees" that particular BOOST_CLASS_EXPORT call. This is because it relies on a global object's constructor to initiate the registration process, but a good compiler will deadstrip all such global objects unless the user explicitly calls a function from the compilation unit that defines them. In other words BOOST_CLASS_EXPORT isn't automatic because a portable program is required to (manually) call a (possibly empty) function from the registered class' cpp file. This is contradictory to BOOST_CLASS_EXPORT's intended use to register derived classes automatically, just by linking their cpp files.
I don't think that's currently true - if it ever was. The code specifically addresses this issue with a number of compiler specific adjustments to insure that code is not stripped. These adjustments have proved effective for all compilers/linkers that boost supports (with the possible exception of CodeWarror). So maybe its true were the system compiled on a strickly comformant compiler which has no extensions to prevent code stripping, but as far as I know, there is no such compiler being used. I also believe that its unlikely that any such compiler/combination will ever see the light of day since it would be useless for building DLLs (shared libraries). Robert Ramey
Emil Dotchevski
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost