Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-09-20 15:58:14


Topi Mäenpää wrote:
> Hi,
>
> I think I resolved the issue. The problem is that if the base class A
> is defined in the main executable, the dynamically loaded DLL
> apparently uses a different address space for the definition. Even if
> I return a pointer to A from the DLL, I get an unregistered void cast
> exception. (I don't know why. Anyone?) If I define the base class in
> yet another DLL that both the main program and the dynamically loaded
> DLL link to, serialization works just fine.

This is very odd to me - how does B compile in the DLL without

This is still a murkey area. I believe there are still unresolved issues
here.

> If A is in
>
> Regarding explicit instantiation, I am using polymorphic archives and
> I'm registering the class after including the polymorphic archive
> headers.
>
> By the way, the serialization library has trouble compiling with gcc
> 3.4.1 on Mandrakelinux 10.1. For some weird reason, namespace
> resolution within boost::serialization and its sub-namespaces does
> not fall back to the global scope. For example, the following doesn't
> compile within the library:
>
> namespace boost { namespace serialization { namespace access {
> boost::serialization::make_nvp(...);
> }}}
>
> I needed to convert all occurrences of "boost::" to "::boost::".

Hmm - maybe it would have been better to use:

namespace boost { namespace serialization { namespace access {
    make_nvp(...);
}}}

Robert Ramey


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