[xsd-users] Issue with includes
Jérôme Dumesnil
jerome.dumesnil at gmail.com
Sun Jan 21 09:42:51 EST 2007
Hi everybody,
Hi Patrick,
>
> Patrick Shinpaugh <pshinpaugh at vt.edu <http://codesynthesis.com/mailman/listinfo/xsd-users>> writes:
>
> >* Hi Boris,
> *>* You must have downloaded the zip archive - unfortunately it is from 2004
> *>* whereas the individual .xsd files on that page are from early 2006.
> *
> Ah, who would have imagined they were different ;-). I downloaded the
> individual files and could reproduce the problem you reported. I tried
> the workarounds I suggested in my previous email. The first approach
> (including x3d-3.0.xsd in x3d-3.0-Web3dExtensionsPublic.xsd) works
> except for two things:
>
> 1. There was an obscure bug in the anonymous type morphing logic that
> only manifested itself when you have such a cyclic inclusion. I've
> fixed this bug for the next version.
>
> 2. The schema uses some default values that include '"' characters.
> These were not properly escaped when used in the generated code so
> the resulting code would not compile. I've fixed this as well.
>
> Otherwise I could compile the schemas and the generated code without
> any problems.
>
> I tried to compil too, but I get some errors when compiling generated cpp
files with gcc 4.1.1 on linux x86.
As you said, I modified x3d-3.0.xsd to include
x3d-3.0-Web3dExtensionsPublic.xsd.
So I generate sources files with :
xsd cxx-tree --morph-anonymous --root-element X3D --hxx-suffix .h
--cxx-suffix .cpp --output-dir src/ x3d-3.0.xsd
xsd cxx-tree --morph-anonymous --root-element X3D --hxx-suffix .h
--cxx-suffix .cpp --output-dir src/ x3d-3.0-Web3dExtensionsPublic.xsd
xsd cxx-tree --morph-anonymous --root-element X3D --hxx-suffix .h
--cxx-suffix .cpp --output-dir src/ x3d-3.0-Web3dExtensionsPublic.xsd
And after, I moved to src directory and I compiled them with :
gcc -c x3d-3.0.cpp
and I get this erros about "IS" :
x3d-3.0-Web3dExtensionsPublic.h:277: erreur: 'IS' in namespace '::' does not
name a type
x3d-3.0-Web3dExtensionsPublic.h:278: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:278: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:279: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:279: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:279: erreur: patron de l'argument 2 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:289: erreur: expected unqualified-id before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:289: erreur: expected ',' or '...' before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:289: erreur: ISO C++ forbids declaration of
'parameter' with no type
x3d-3.0-Web3dExtensionsPublic.h:295: erreur: 'type' is not a member of
'XvlShell::IS'
x3d-3.0-Web3dExtensionsPublic.h:295: erreur: 'type' is not a member of
'XvlShell::IS'
x3d-3.0-Web3dExtensionsPublic.h:295: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:295: erreur: 'void XvlShell::IS(int)' cannot
be overloaded
x3d-3.0-Web3dExtensionsPublic.h:289: erreur: with 'void XvlShell::IS(int)'
x3d-3.0-Web3dExtensionsPublic.h:302: erreur: 'MetadataDouble' in namespace
'::' does not name a type
x3d-3.0-Web3dExtensionsPublic.h:303: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:303: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:304: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:304: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:304: erreur: patron de l'argument 2 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:314: erreur: expected unqualified-id before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:314: erreur: expected ',' or '...' before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:314: erreur: ISO C++ forbids declaration of
'parameter' with no type
x3d-3.0-Web3dExtensionsPublic.h:320: erreur: 'type' is not a member of
'XvlShell::MetadataDouble'
x3d-3.0-Web3dExtensionsPublic.h:320: erreur: 'type' is not a member of
'XvlShell::MetadataDouble'
x3d-3.0-Web3dExtensionsPublic.h:320: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:320: erreur: 'void
XvlShell::MetadataDouble(int)' cannot be overloaded
x3d-3.0-Web3dExtensionsPublic.h:314: erreur: with 'void
XvlShell::MetadataDouble(int)'
x3d-3.0-Web3dExtensionsPublic.h:327: erreur: 'MetadataFloat' in namespace
'::' does not name a type
x3d-3.0-Web3dExtensionsPublic.h:328: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:328: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:329: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:329: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:329: erreur: patron de l'argument 2 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:339: erreur: expected unqualified-id before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:339: erreur: expected ',' or '...' before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:339: erreur: ISO C++ forbids declaration of
'parameter' with no type
x3d-3.0-Web3dExtensionsPublic.h:345: erreur: 'type' is not a member of
'XvlShell::MetadataFloat'
x3d-3.0-Web3dExtensionsPublic.h:345: erreur: 'type' is not a member of
'XvlShell::MetadataFloat'
x3d-3.0-Web3dExtensionsPublic.h:345: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:345: erreur: 'void
XvlShell::MetadataFloat(int)' cannot be overloaded
x3d-3.0-Web3dExtensionsPublic.h:339: erreur: with 'void
XvlShell::MetadataFloat(int)'
x3d-3.0-Web3dExtensionsPublic.h:352: erreur: 'MetadataInteger' in namespace
'::' does not name a type
x3d-3.0-Web3dExtensionsPublic.h:353: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:353: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:354: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:354: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:354: erreur: patron de l'argument 2 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:364: erreur: expected unqualified-id before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:364: erreur: expected ',' or '...' before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:364: erreur: ISO C++ forbids declaration of
'parameter' with no type
x3d-3.0-Web3dExtensionsPublic.h:370: erreur: 'type' is not a member of
'XvlShell::MetadataInteger'
x3d-3.0-Web3dExtensionsPublic.h:370: erreur: 'type' is not a member of
'XvlShell::MetadataInteger'
x3d-3.0-Web3dExtensionsPublic.h:370: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:370: erreur: 'void
XvlShell::MetadataInteger(int)' cannot be overloaded
x3d-3.0-Web3dExtensionsPublic.h:364: erreur: with 'void
XvlShell::MetadataInteger(int)'
x3d-3.0-Web3dExtensionsPublic.h:377: erreur: 'MetadataSet' in namespace '::'
does not name a type
x3d-3.0-Web3dExtensionsPublic.h:378: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:378: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:379: erreur: 'type' was not declared in this
scope
x3d-3.0-Web3dExtensionsPublic.h:379: erreur: patron de l'argument 1 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:379: erreur: patron de l'argument 2 est
invalide
x3d-3.0-Web3dExtensionsPublic.h:389: erreur: expected unqualified-id before
'&' token
x3d-3.0-Web3dExtensionsPublic.h:389: erreur: expected ',' or '...' before
'&' token
...
So, can you tell me what's wrong with "IS" ??
Thank you
JayDee
More information about the xsd-users
mailing list