[xsd-users] hxx file not including superclass type

Boris Kolpackov boris at codesynthesis.com
Thu Feb 14 02:40:41 EST 2008


Hi Lane,

Lane Wimberley <techlane64 at gmail.com> writes:

> Everything compiles with xsd just fine, but when I attempt to compile
> zConfig.cxx, I get errors because in zConfig.hxx there is ...
>
>   class simpleParam_t: public ::ZebraConfig::configParam_t
>
> ...but ::ZebraConfig::configParam_t is defined in zConfig-base.hxx,
> which is not included.

I tried to compile your sample schemas without the --custom-type
options and then compiled the generated C++ code and everything
works fine. zConfig-base.hxx is included in zConfig.hxx indirectly
via SimpleParam.hxx.

When you add the "--custom-type configParam_t=/configParam_base"
option, the XSD compiler generates only a forward declaration for
configParam_t and if this type is not defined by you later, you
will get the error when trying to inherit from this type (you
cannot inherit from a forward-declared class). I suspect that
something is not right in configParam-custom.hxx. Feel free to
send its contents if you cannot spot the problem yourself.

Boris




More information about the xsd-users mailing list