Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-04-13 23:43:50


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


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