高手来 ,PRO*C编译遇到一个错误PCC-S-02201,在线等
系统:SunOS
数据库:Oracle 9i
出现很多PCC-S-02201,到晚上找了一下,有很多类似的问题,主要是
1.修改$ORACLE_HOME/precomp/admin/pcscfg.cfg
2.编译选项parse=none
我试了都没解决问题,高手帮帮忙。
我的pcscfg.cfg文件如下:
sys_include=(/usr/include,/usr/include/sys,oracle/ora920/precomp/public,/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include)
include=$(ORACLE_HOME)/precomp/public
include=$(ORACLE_HOME)/precomp/hdrs
include=$(ORACLE_HOME)/rdbms/public
include=$(ORACLE_HOME)/rdbms/demo
include=$(ORACLE_HOME)/network/include
include=$(ORACLE_HOME)/network/public
include=$(ORACLE_HOME)/plsql/public
ltype=short
define=__x86_64__
编译错误信息如下:
Syntax error at line 69, column 2, file /usr/include/sys/uio.h:
Error at line 69, column 2 in file /usr/include/sys/uio.h
lloff_t _uio_offset; /* file offset */
.1
PCC-S-02201, Encountered the symbol "lloff_t" when expecting one of the followin
g:
} 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,
The symbol "enum," was substituted for "lloff_t" to continue.
Syntax error at line 72, column 2, file /usr/include/sys/uio.h:
Error at line 72, column 2 in file /usr/include/sys/uio.h
lloff_t _uio_limit; /* u-limit (maximum byte offset) */
.1
PCC-S-02201, Encountered the symbol "lloff_t" when expecting one of the followin
g:
} 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,
The symbol "enum," was substituted for "lloff_t" to continue.
Syntax error at line 52, column 2, file /usr/include/sys/socket_impl.h:
Error at line 52, column 2 in file /usr/include/sys/socket_impl.h
sa_family_t sa_family; /* address family */
.1
PCC-S-02201, Encountered the symbol "sa_family_t" when expecting one of the foll
owing:
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,
The symbol "enum," was substituted for "sa_family_t" to continue.
------解决方案--------------------
检查头文件目录是否就是期望的目录,Oracle缺省设置的目录有时候需要修改
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include是否包含编译器提供的头
一般设置成如下所示的造型也就可以了
sys_include=(/usr/include,/usr/include/sys,oracle/ora920/precomp/public,/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include)
ltype=short
define=__x86_64__
------解决方案--------------------
我感觉是lloff_t的类型没有定义,所以可能是在$ORACLE_HOME/precomp/admin/pcscfg.cfg 没有包括定义lloff_t需要的头文件的目录,或者定义这个类型需要某些宏,这些宏没有在$ORACLE_HOME/precomp/admin/pcscfg.cfg 中定义。
我是根据我的经验猜的,不一定准确,仅供参考
------解决方案--------------------
先看下lloff_t的类型是定义在哪个头文件里面的,假设是a.h,然后把a.h所在的路径加到红色标记路径的前面再试下
sys_include=(/usr/include,/usr/include/sys,oracle/ora920/precomp/public,/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include)
--转自