[xml] Problems with compiling validation code



I try to do some validation with libxml and for that purpose I coded some code to replace the xmlDefaultExternalEntityLoader. But now I have some problems to compile it.

I use RedHat Linux 7.1 on a Pentium III machine with gcc-2.96-85 and I have tried this with libxml 2.3.11-13 installed from RPMs.

So the result is like this:

gcc -D_REENTRANT=1 -I. -Wall -O2 -g -Wbad-function-cast -Wcast-align -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -I/usr/include/libxml -I/usr/include -DBROKEN_PTHREADS=1 -o gw/dtd_loader.o -c gw/dtd_loader.c
In file included from /usr/include/libxml/xmlIO.h:16,
                 from gw/dtd_loader.h:21,
                 from gw/dtd_loader.c:12:
/usr/include/libxml/parser.h:43: parse error before `xmlParserInputBufferPtr' /usr/include/libxml/parser.h:43: warning: no semicolon at end of struct or union
/usr/include/libxml/parser.h:58: parse error before `}'
/usr/include/libxml/parser.h:457: parse error before `xmlParserInputBufferPtr' /usr/include/libxml/parser.h:458: warning: function declaration isn't a prototype
/usr/include/libxml/parser.h:526: parse error before `xmlInputReadCallback'
/usr/include/libxml/parser.h:529: warning: function declaration isn't a prototype /usr/include/libxml/parser.h:532: parse error before `xmlParserInputBufferPtr'
/usr/include/libxml/parser.h:533: warning: function declaration isn't a
prototype
...
-<some unrelevant warnings removed>-
...
gw/dtd_loader.c: In function `kannel_external_entity_loader':
gw/dtd_loader.c:139: dereferencing pointer to incomplete type
gw/dtd_loader.c:140: dereferencing pointer to incomplete type
gw/dtd_loader.c:141: dereferencing pointer to incomplete type
gw/dtd_loader.c:143: dereferencing pointer to incomplete type
gw/dtd_loader.c:143: dereferencing pointer to incomplete type
gw/dtd_loader.c:144: dereferencing pointer to incomplete type
gw/dtd_loader.c:144: dereferencing pointer to incomplete type
gw/dtd_loader.c:145: dereferencing pointer to incomplete type
gw/dtd_loader.c:145: dereferencing pointer to incomplete type
gw/dtd_loader.c:145: dereferencing pointer to incomplete type
make: *** [gw/dtd_loader.o] Error 1
make: Target `all' not remade because of errors.

So I get an error every time I try to use xmlParserInputPtr, which is quite reasonable taking the errors in the parser.h. But those I just don't understand. Is it me or my compiler? I have heard that RedHat 7.x isn't the most ideal development environment. Should I up/downgrade my compiler or the hole system?


--
Tuomas Luttinen
    Application Developer -- Mgine Technologies
        **************





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