[xsd-users] abstract type and its c++ equivalent

Klima Georg G.Klima at durst-online.at
Wed Apr 24 09:39:30 EDT 2013


Hello Boris,

thank you, thats exactly what I do: packaging all xsd generated code into a static library.
This also explains why that dynamic cast helps, it "forces" linkage, that would otherwise be omitted. - My best guess!

Georg

-----Ursprüngliche Nachricht-----
Von: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Gesendet: Mittwoch, 24. April 2013 15:31
An: Klima Georg
Cc: xsd-users at codesynthesis.com
Betreff: Re: [xsd-users] abstract type and its c++ equivalent

Hi Georg,

Klima Georg <G.Klima at durst-online.at> writes:

> XAlignDescriptorSimpleFrameSample.xml
> terminate called after throwing an instance of 'xsd::cxx::tree::no_type_info<char>'
>   what():  no type information available for a type

This means that there is no C++ type corresponding to the XML Schema type specified with the xsi:type attribute or used in a substitution group. Can you make sure that you have compiled all your polymorphic types as such (--polymorphic-type-all should take care of this) and also that you actually compile and link all the generated .cxx files into your application. One common situation where this might not happen is if you package the generated code into a static (.a) library.

Boris



More information about the xsd-users mailing list