
Dan Thill wrote:
You could make a separt little module which you would compile into your main which would include all the BOOST_CLASS_EXPORT macros for your types. Then the linker would get the code from your static library.
This sounds intriguing. Say I put all the BOOST_CLASS_EXPORT macros into a single header file. Wouldn't I run into trouble if I included that header file twice in the same executable, due to the multiple definitions of the static guid_initializer. Or would the linker see that they are exactly the same, and only choose one? Or is the answer "depends" :)
Thank you.
-Dan
My suggestion is to include BOOST_CLASS_EXPORT in just one *.cpp file. This "registration" module would be called only to build with static libraries Robert Ramey