[xsd-users] Re: XSD 2.3.1 export symbols problem with MSVC 8.0

Shaun Mangelsdorf s.mangelsdorf at gmail.com
Tue Oct 23 15:59:59 EDT 2007


Apologies.. For some reason Gmail decided to reply off list by default.

> Hi Boris,
>
> >
> > sequence (size_type n, const X& x = X ())
> >   : sequence_common (n, x)
> > {
> > }
>
> Worked like a charm. I also needed to do the same in 2 other places,
> overall diff attached.
>
>
> > > My theory is that G++ doesn't see it because it's never used, and so
> > > it's not compiled, but MSVC compiles the whole template class.
> >
> > I think I know what happens: when you export a type, VC++ for some
> > (perhaps valid, from its DLL architecture point of view) reason
> > instantiates things that aren't directly used. That's why when
> > you remove the DLL export macro, everything compiles. Of course,
> > this is a violation of the C++ Standard which says that only
> > functions that are used should be instantiated.
> >
> > Thanks for reporting this!
> >
> > Boris
> >
> > [1] http://codesynthesis.com/~boris/blog/2006/12/06/default-argument-or-overloading/
> >
>
> Very interesting the way compilers handle certain things differently..
> Thanks for the insight.
>
>
>
> Thanks,
> Shaun Mangelsdorf
>
>




More information about the xsd-users mailing list