$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [serialization] link error and exception onget_key
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-01-16 01:04:09
I just separated things out and things seemed to work fine.  The only thing 
that might
or might not be an issue is header order:
#include <boost/serialization/type_info_implementation.hpp>
#include <boost/serialization/extended_type_info_no_rtti.hpp>
#include <boost/serialization/export.hpp>
#include "polymorphic_derived1.hpp"
BOOST_CLASS_EXPORT(polymorphic_derived1)
const char * polymorphic_derived1::get_key() const {
return
boost::serialization::type_info_implementation<
polymorphic_derived1
>::type::get_const_instance().get_key();
}
Notice I specified extended_type_info_no_rtti.hpp before export.hpp.  If I 
remember
correctly, if no type id system header is specified before export is 
encountered
the system may take the rtti one as the default.  Since we're not using 
defaults
in this example, its probably not an issue.
As far as I know, no one has ever asked a question about using EXPORT 
without
rtti before - at least no one has ever had any questions about it.  You may 
be
treading new ground here.
Robert Ramey
"Daniel Roberts" <impulsionaudio_at_[hidden]> wrote in message 
news:14125aaf0901152130l510f8696o6456b51416dd3e9d_at_mail.gmail.com...
Thanks, I had both macros in the header file. I moved the BOOST_CLASS_EXPORT 
macro to the cpp file and that seems to have fixed it. Now I just need to 
get things working in my own code.
Thanks again.
does the header file of polymorphic_derived1's include the following?
BOOST_CLASS_TYPE_INFO(
polymorphic_derived1,
extended_type_info_no_rtti<polymorphic_derived1>
)
Also, the *.cpp file of polymorphic_derived1 should contain
BOOST_CLASS_EXPORT(polymorphic_derived1)
Robert Ramey
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://listarchives.boost.org/mailman/listinfo.cgi/boost-users