[MPI] Derived class not properly registered, even if it is.

Hi,
I'm using MPI and I've come to an strange assertion fail from the
library and I was wondering if it was "normal".
Here is the code.
I've got three files: header.hpp main.cpp other.cpp
- - - - - - - -
header.cpp
- - - - - - - -
#ifndef HEADER_HPP
#define HEADER_HPP
#include
::get_const_instance().end()' failed.
I realized that if I uncomment these lines in main.cpp:
#include

AMDG Mathieu Larose wrote:
I realized that if I uncomment these lines in main.cpp:
#include
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

2009/6/10 Steven Watanabe
AMDG
Mathieu Larose wrote:
I realized that if I uncomment these lines in main.cpp:
#include
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
and , I think.
You are absolutely right. Thanks!
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Mathieu Larose
-
Steven Watanabe