Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPI] Derived class not properly registered, even if it is.
From: Mathieu Larose (mat087_at_[hidden])
Date: 2009-06-11 00:38:11


2009/6/10 Steven Watanabe <watanabesj_at_[hidden]>:
> AMDG
>
> Mathieu Larose wrote:
>>
>> I realized that if I uncomment these lines in main.cpp:
>>
>> #include <boost/serialization/export.hpp>
>> BOOST_CLASS_EXPORT(B);
>>
>> My code runs correctly.
>>
>> It seems that BOOST_CLASS_EXPORT needs to be in the same .cpp file
>> (i.e main.cpp) where MPI is used. When using serialization only,
>> BOOST_CLASS_EXPORT could be in any .cpp files.
>>
>> Is this normal?
>>
>> Also, if A is no more an abstract class, BOOST_CLASS_EXPORT(B); could
>> be called from other.cpp and the code runs correctly.
>>
>> I'm using version 1.39.0.
>>
>
> You need to #include all the appropriate archive headers before
> using BOOST_CLASS_EXPORT.  In this case you need
> <boost/mpl/packed_oarchive.hpp> and
> <boost/mpi/packed_iarchive.hpp>, I think.
>

You are absolutely right. Thanks!

> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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