[xml] Problem in Compiling testWriter.c Example



Hi Everybody,

I am new to libxml2 and recently installed on Red Hat
LInux 9.0. I am facing problem in compiling
testWriter.c which is one of the examples listed at
http://www.xmlsoft.org site.

I am using following command to compile the
testWriter.c

gcc -o example `xml2-config --cflags`
/home/dahuja/Articles/XML/example.c `xml2-config
--libs`

Compilation Errors are as follows :

/usr/local/include/libxml2/libxml/encoding.h:152:
syntax error before "void"
/usr/local/include/libxml2/libxml/encoding.h:153:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:154:
syntax error before "void"
/usr/local/include/libxml2/libxml/encoding.h:155:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:156:
syntax error before "void"
/usr/local/include/libxml2/libxml/encoding.h:157:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:158:
syntax error before "xmlCharEncodingHandlerPtr"
/usr/local/include/libxml2/libxml/encoding.h:159:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:160:
syntax error before "xmlCharEncodingHandlerPtr"
/usr/local/include/libxml2/libxml/encoding.h:161:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:162:
syntax error before "xmlCharEncodingHandlerPtr"
/usr/local/include/libxml2/libxml/encoding.h:165:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:170:
syntax error before "int"
/usr/local/include/libxml2/libxml/encoding.h:172:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:173:
syntax error before "int"
/usr/local/include/libxml2/libxml/encoding.h:174:
warning: data definition has no type or storage class
/usr/local/include/libxml2/libxml/encoding.h:175:
syntax error before "const"
/usr/local/include/libxml2/libxml/encoding.h:176:
parse error before "xmlGetEncodingAlias"


Please guide me on this.

Thanks & Regards
Dinesh-Ahuja




________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]