ANTLR C target and XMLLib -


i have program written in c uses xmllib , lexer/parser generated antlr.

my includes like:

#include    "myparser.h" #include    "mylexer.h" #include    "antlr3.h" #include <libxml/tree.h> #include <libxml/parser.h> 

the problem program refuses compile, erroring with:

in file included /usr/include/libxml2/libxml/parser.h:19:0,                  /usr/include/libxml2/libxml/globals.h:18,                  /usr/include/libxml2/libxml/threads.h:35,                  /usr/include/libxml2/libxml/xmlmemory.h:218,                  /usr/include/libxml2/libxml/tree.h:1248,                  myprogram.c:4: /usr/include/libxml2/libxml/valid.h:276:21: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant /usr/include/libxml2/libxml/valid.h:302:21: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant in file included /usr/include/libxml2/libxml/globals.h:18:0,                  /usr/include/libxml2/libxml/threads.h:35,                  /usr/include/libxml2/libxml/xmlmemory.h:218,                  /usr/include/libxml2/libxml/tree.h:1248,                  myprogram.c:4: /usr/include/libxml2/libxml/parser.h:800:19: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant in file included /usr/include/libxml2/libxml/parser.h:808:0,                  /usr/include/libxml2/libxml/globals.h:18,                  /usr/include/libxml2/libxml/threads.h:35,                  /usr/include/libxml2/libxml/xmlmemory.h:218,                  /usr/include/libxml2/libxml/tree.h:1248,                  myprogram.c:4: /usr/include/libxml2/libxml/xmlio.h:293:19: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant in file included /usr/include/libxml2/libxml/globals.h:18:0,                  /usr/include/libxml2/libxml/threads.h:35,                  /usr/include/libxml2/libxml/xmlmemory.h:218,                  /usr/include/libxml2/libxml/tree.h:1248,                  myprogram.c:4: /usr/include/libxml2/libxml/parser.h:961:22: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant /usr/include/libxml2/libxml/parser.h:967:22: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant /usr/include/libxml2/libxml/parser.h:1063:54: error: expected ‘)’ before ‘f’ /usr/include/libxml2/libxml/parser.h:1065:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xmlgetexternalentityloader’ /usr/include/libxml2/libxml/parser.h:1068:19: error: expected ‘;’, ‘,’ or ‘)’ before numeric constant 

if don't include first 2 includes compiles correctly (i replaced main() function simple 'return 0'). idea causing this? :(

my compile command looks like:

gcc *.c -c -lantlr3c -i/usr/include/libxml2 

edit: installed libxml2-dev package ubuntu package manager if makes difference

looks macro problems. line 961 of parser.h includes id, may defined in 1 of headers.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -