Boost Serialization of base/derived class via BOOST_CLASS_EXPORT_KEY/BOOST_CLASS_IMPLEMENTATION

Dear all

I use boost::serialization, and am troubled with
the below, well known, error occurs.

> unregistered class - derived class not registered or exported


Here, I succeed it in header-only use (BOOST_CLASS_EXPORT in header file).
Nevertheless, I got the error in separate use of header and implementation(BOOST_CLASS_EXPORT_KEY / BOOST_CLASS_IMPLEMENTATION).

(If possible, I would like to use the latter)

What's wrong?
If you know something,
I would appreciate it if you could tell me.

Kind regards
Last edited on
create a testcase
I apologize for my question that lacks in detail of code.
But, I could resolve this problem by myself.

In the context,
Explicit registration as the below was needed in the usage of BOOST_CLASS_EXPORT_KEY/BOOST_CLASS_IMPLEMENTATION.

ar.template register_type<derivedClass>() //ar: Archive type

Perhaps, I suppose the usage of BOOST_CLASS_EXPORT implicit registration occurs.
Last edited on
Topic archived. No new replies allowed.