Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-08-10 21:23:27


I compiled this code with the change below. Uncomment
one of the serialization functions.

I'm suprised this was necessary - I'll look into it.

Robert Ramey

Jeshua Bratman wrote:
> Robert Ramey wrote:
>>
>> Double check that you're using the macro outside any namespace.
>>
>> Double check that the EXPORT is in the same module as the headers
>>
>> Double check - for 1.33 that the archive headers are before the
>> export header.
>>
> hmm. this is all correct in my code. In fact, this trivial piece of
> code does not compile:
>
>
> #include <boost/serialization/base_object.hpp>
> #include <boost/archive/text_oarchive.hpp>
> #include <boost/archive/text_iarchive.hpp>
> #include <boost/serialization/export.hpp> //AFTER all
> archive headers
>
> //BASE
> class base
> {
> public:
> virtual void virt_func() = 0;
> };
> BOOST_IS_ABSTRACT(base);
>
> //DERIVED
> class derived : public base
> {
> public:
> void virt_func() {}
   // template<class Archive>
   // void serialize(Archive& ar, const unsigned int version);
> };
> BOOST_CLASS_EXPORT_GUID(derived,"derived") //no namespaces here
>
// template<class Archive>
// void serialize(Archive &ar, derived & d, const unsigned int version);

> //MAIN
> int main(){return 0;}
>
>
> Is this code correct? Does it compile for you?
>
>
>
>
>> Check test export and compare it with your own code.
>>
> What do you mean by "Check test export"?
>
>
> Thanks for all the time you're putting into helping me,
>
> Jeshua
>
>
> _______________________________________________
> 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