[xsd-users] Problems linking Code which uses XSD in Release mode

Boris Kolpackov boris at codesynthesis.com
Thu Nov 6 02:47:04 EST 2008


Hi Jan,

Jan Klimke <jan.klimke at hpi.uni-potsdam.de> writes:

> I solved the problem vor now by editing the generated header file
> containing the xml_schema definitions.
> 
> No export symbols were generated inside the whole file. Which caused for
> some reason the linker to exclude those template instanciation from
> beeing exported.
> 
> I changed the following files by instanciating the template classes
> (WFS_API defines dll_export and import depending on compile mode):
> 
> template class WFS_API ::xsd::cxx::tree::ncname< char, Name >;
> typedef ::xsd::cxx::tree::ncname< char, Name > Ncname;
> 
> template class WFS_API ::xsd::cxx::tree::qname< char, SimpleType, Uri,
> Ncname >;
>   typedef ::xsd::cxx::tree::qname< char, SimpleType, Uri, Ncname > Qname;

Thanks for the feedback. The really mysterious thing about all this 
is why those two symbols end up having import declaration even though
there is no place in the source code where they are declared as such.

I think you are using the GML schemas. I am wondering if it will be
possible to remove dependencies on other libraries from your project
and still get this error. In other words just have a DLL with the
generated code and a test driver. If you have time and would like 
to get to the bottom of this, I am willing to take a look at such a
stripped down project.

Boris




More information about the xsd-users mailing list