Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-04-14 14:31:18


Peter Dimov wrote:
> Robert Ramey:
>> Peter Dimov wrote:
>
>> I believe that making a *.cpp file with the macros
>> BOOST_CLASS_EXPORT(T) would be exactly equivalent to the above.
>
> Well, it depends on where the .cpp file is. If it's part of the static
> library, it will not be included by the linker because there are no
> references to it. But it is true that

What I meant was that if you want to make sure the stuff in the
static library is linked in, just make a small *.cpp file as part
of your main program which includes the BOOST_CLASS_EXPORT
macros.

#include "a.hpp"
#include "b.hpp"
...

BOOST_CLASS_EXPORT(A)
BOOST_CLASS_EXPORT(B)

....

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