[xsd-users] exporting symbols from a windows dll
Angelo Difino
angelo at smartrm.com
Tue Aug 24 10:36:39 EDT 2010
On 24/08/2010 16:17, Boris Kolpackov wrote:
> Hi Angelo,
>
> Angelo Difino<angelo at smartrm.com> writes:
>
>
>> If i export the symbols I can create the c++ class, but when i try to
>> compile i found a lot of this kind of error:
>>
> Ok, I think I know what's going on. If you look into SegmentType.hxx
> you will see that the CreationInformationType type is forward-declared
> in this header but not defined. The definition is included later in
> SegmentType.cxx. The file-per-type mode relies on such forward
> declarations to untangle mutual dependencies between types.
>
> Now, when you declare a class as DLL-exported, VC++ will have to
> instantiate every implicit, non-inline function so that they actually
> reside in the DLL. In this case it tries to instantiate implicit
> operator=. The problem arises because the body of this copy-assignment
> operator requires the definition of CreationInformationType. One thing
> that you can try is to compile your DLL in the Release mode and see
> if this error disappears (it may disappear because operator= will be
> inlined).
>
> The proper fix for this problem would be to generate our own
> implementation of operator= in the .cxx file where the definition of
> CreationInformationType is known. If you would like, I can send you
> a pre-release binary to try when this fix is ready.
>
Hi Boris,
thank you for the support!
Yes, please keep me updated about this issue... i'll test this feature
as soon as it will
ready!
Best,
Angelo
More information about the xsd-users
mailing list