Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-03-14 16:19:58


So the issue is not related to "export".

It is likely a question of template code instantiation.

This subject is touched up by the example "demo_pimpl"
and its related documentation. Check that out and
see if it helps.

Robert Ramey

Christian Widmer wrote:
> Dear Robert,
>
>
> Robert Ramey wrote:
>> I'm not sure what "shared object" means here.
>>
> Shared-object in the sense of a dynamically linked library (DLL).
>> Which should be fine as is if labels in fact a pointer to one
>> instance of CLabels.
>>
>> If labels is a base class pointer to a more derived type,
>> it,s THAT derived type which must be exported.
>>
> "labels" is in fact a pointer to a instance of CLabels, not a base
> class pointer. The code above works just fine if contained in the same
> shared-library (DLL). Not sure how to proceed.
>
>
> Best regards,
>
> Christian Widmer
>
>
>> Christian Widmer wrote:
>>
>>>> Dear Robert,
>>>>
>>>>
>>>> thank you for your reply. After struggling with some other issues
>>>> for a couple days, I've compiled boost-1.34 with the serialization
>>>> patch from your website, as you suggested.
>>>>
>>>> In deed, the "unregistered class" problem disappeared, but was
>>>> unfortunately replaced by a "unregistered void cast" exception when
>>>> trying to serialize across shared-object boundaries.
>>>>
>>>> All classes are registered using BOOST_CLASS_EXPORT in their
>>>> respective .cpp file, yet I can't get it to work. I attached a
>>>> piece of my code to this email. The attached archive contains the
>>>> following files:
>>>>
>>>> - Classifier.h
>>>> - Classifier.cpp
>>>> - Labels.h
>>>> - Labels.cpp
>>>>
>>>> The class CClassifier has a field labels of type CLabels. The
>>>> classes are contained in two separate shared-objects. When trying
>>>> to serialize an object of type CClassifier, an exception gets
>>>> thrown when attempting to serialize the field labels. Any ideas?
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Christian Widmer
>>>>
>>>>
>>
>>
>> _______________________________________________
>> 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