- 论坛徽章:
- 0
|
系统:linux as 5 + oracle10g + tuxedo8.1
编写一个curses的应用程序,要在程序里面连接数据库,在头文件里面包含 curses.h 头文件以后,编译出现下面的问题:
rm -f *.lis
proc -DQLSQLCA iname=scr lines=ture parse=full include=/oracle/product/10.2.0/db_1/precomp/public include=/home/tuxedo/tuxedo/include include=/home/unipost/def
Pro*C/C++: Release 10.2.0.1.0 - Production on Wed May 7 13:13:20 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
System default option values taken from: /oracle/product/10.2.0/db_1/precomp/admin/pcscfg.cfg
Syntax error at line 342, column 2, file /usr/include/curses.h:
Error at line 342, column 2 in file /usr/include/curses.h
bool _notimeout; /* no time out on function-key entry? */
.1
PCC-S-02201, Encountered the symbol "_Bool" when expecting one of the following:
} char, const, double, enum, float, int, long, ulong_varchar,
OCIBFileLocator OCIBlobLocator, OCIClobLocator, OCIDateTime,
OCIExtProcContext, OCIInterval, OCIRowid, OCIDate, OCINumber,
OCIRaw, OCIString, short, signed, sql_context, sql_cursor,
struct, union, unsigned, utext, uvarchar, varchar, void,
volatile, a typedef name,
Syntax error at line 0, column 0, file scr.pc:
Error at line 0, column 0 in file scr.pc
PCC-S-02201, Encountered the symbol "<eof>" when expecting one of the following:
; : an identifier, end-exec, random_terminal
Error at line 0, column 0 in file scr.pc
PCC-F-02102, Fatal error while doing C preprocessing
make: *** [scr.o] Error 1
如果把curses.h头文件去掉不包含,编译就没有问题,编译以后也可以执行
在网上找了好久,好像有人说过proc编译和curses.h 和 socket.h 这两个头文件都有冲突,有个哥们好像是把要使用到的函数使用gcc编译成一个静态链接库来调用,但是我不想这样做,请问大家还有别的好办法解决这个问题吗?多谢了 |
|