Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-03-14 15:23:22


Carsten Tham wrote:
> Hi,
>
> i've run into a problem with serialization in combination with
> static-libraries:
>
> In my first try i defined BOOST_CLASS_EXPORT in the header-file of my
> exported classes. It worked for the libraries but gave me
> linker-errors in my applications (multiple defines).
>

This shouldn't happen - but I have has problems with this in the past. You
should be able to use BOOST_CLASS_EXPORT in a header as long as you use
archives in only one of your modules.

> I think the link-problems are due to some static functions, defined by
> BOOST_CLASS_EXPORT, therefore i moved the macro-instantiations to my
> application, which fixed my problem.
>
> If this is the correct way to handle the issue i would suggest to
> include this situation in the docs.

I'll consider this.

>
> BTW:
> I want to thank Robert Ramey for this great library! It serialized my
> deeply nested object-structure with lots of shared smart-ptr's
> without any problem in all 3 formats and with very little work on my
> side.
> Thanks for such a great contribution to boost!
>
You're welcome

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