pro*c 编译包含libxml2的头文件不通过
我现在在机器上装了libxml2了,用c写了一些基础函数,暂时叫xml.c和xml.h,我然后写了一个pro.pc,调用xml.h中的函数,当然xml.h中的函数涉及到libxml2中的内容
如果单独写一个c的makefile是可以编译xml.h和xml.c的,现在我写了个pc的makefile,包含xml.h后就编译通过不了了
报很多类似的错误,好像是数据类型的转换问题
Syntax error at line 106, column 42, file /usr/local/include/libxml2/libxml/xmlstring.h:
Error at line 106, column 42 in file /usr/local/include/libxml2/libxml/xmlstring
.h
va_list ap);
.........................................1
PCC-S-02201, Encountered the symbol "va_list" when expecting one of the followin
g:
... auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name, exec oracle, exec oracle begin, exec,
exec sql, exec sql begin, exec sql type, exec sql var,
The symbol "enum," was substituted for "va_list" to continue.
Syntax error at line 28, column 9, file /usr/local/include/libxml2/libxml/tree.h:
Error at line 28, column 9 in file /usr/local/include/libxml2/libxml/tree.h
typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
........1
PCC-S-02201, Encountered the symbol "xmlParserInputBuffer" when expecting one of
the following:
auto, char, const, double, enum, float, int, long,
ulong_varchar, OCIBFileLocator OCIBlobLocator,
OCIClobLocator, OCIDateTime, OCIExtProcContext, OCIInterval,
OCIRowid, OCIDate, OCINumber, OCIRaw, OCIString, register,
short, signed, sql_context, sql_cursor, static, struct,
union, unsigned, utext, uvarchar, varchar, void, volatile,
a typedef name,
The symbol "enum," was substituted for "xmlParserInputBuffer" to continue.
很多类似的错误,目前我不知道怎么解决。
我本想先把pc编译成c文件后看看,但我在makefile中
.pc.o:
$(PROC) $(PROCFLAGS) include=$(BCIAINCLUDE) include=$(LIBXML2INCLUDE) iname=$*
$(CC) $(CFLAGS) -I$(BCIAINCLUDE) -I$(LIBXML2INCLUDE) -o $*.o -c $*.c
把这段禁掉后,makefile显示不知道怎么编译
然后我把上段变成(在proc是不要包含libxml2的头文件)
.pc.o:
$(PROC) $(PROCFLAGS) include=$(BCIAINCLUDE) iname=$*
$(CC) $(CFLAGS) -I$(BCIAINCLUDE) -I$(LIBXML2INCLUDE) -o $*.o -c $*.c
显示找不到LIBXML2的头文件
如果有libxml2和pro*c中有类型或者什么冲突的话,不知道有没有其它的解决办法呢
我快要疯了,在线等,等待高手解疑