[xsd-users] "expected identifier before numeric constant" error
Hing Liu
hing.liu at gmail.com
Sun Jun 4 01:46:27 EDT 2017
Hi Support,
I got a problem when compiling the C file generated from XSD.
The command to generate the C file from xsd:
$xsd cxx-tree --generate-serialization --cxx-suffix .C --hxx-suffix .h
--guard-prefix MY_XSD_GEN --generate-polymorphic --polymorphic-type-all
--generate-ostream isocrstypes_v1.0.xsd
The command to compile the C file:
$gcc -c -o test.o isocrstypes_v1.0.C -I
/proj/inferno/copyleft/s86/xsd-3.3.0/include/ -I
/proj/inferno/copyleft/s86/xerces-c/include/
However, there is an error like below:
isocrstypes_v1.0.h:487:7: error: expected identifier before numeric constant
GS,
After searching around, it seems like there is preprocessor conflict to the
enum value "GS", but I cannot see the conflict even using gcc -E option.
Attached please find the xsd file.
The thing is working fine when I run it in Linux, it just happens in
Solaris. Let me know what information you need. The gcc version used in
Solaris is gcc 4.9.2, while in Linux it is gcc 4.4.7.
Please help and thanks.
BR,
Hing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isocrstypes_v1.0.xsd
Type: application/octet-stream
Size: 74859 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20170604/b3f2380a/isocrstypes_v1.0-0001.obj
More information about the xsd-users
mailing list