SUSE Enterprise Server 11 SP3上的Pro * C编译错误

时间:2016-02-18 03:44:41

标签: sql-server linux oracle

当我在没有parse=none的情况下进行Pro * C编译时,即使我在$(ORACLE_HOME)/precomp/admin/pcscfg.cfg中添加正确的路径,仍然无法打开一些包含文件。

[Linux:/si/usr/hrl]proc stu.pc oname=stu.c

Pro*C/C++: Release 10.2.0.4.0 - Production on Thursday Feb 18th 11:32:07 2016

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

System default option values taken from: /home2/oracle/app/oracle/product/10.2.0/db/precomp/admin/pcscfg.cfg

Error at line 48, column 10 in file /usr/include/c++/4.3/cstdio
#include <bits/c++config.h>
.........1
PCC-S-02015, unable to open include file
Error at line 48, column 10 in file /usr/include/c++/4.3/cstddef
#include <bits/c++config.h>
.........1
PCC-S-02015, unable to open include file
Syntax error at line 56, column 3, file /usr/include/c++/4.3/cstddef:
Error at line 56, column 3 in file /usr/include/c++/4.3/cstddef
  using ::ptrdiff_t;
..1
PCC-S-02201, Encountered the symbol "using" when expecting one of the following:

   ; { , = ( [ auto, char, const, double, enum, extern, 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,
   typedef, union, unsigned, utext, uvarchar, varchar, void,
   volatile, a typedef name, a precompiled header, exec oracle,
   exec oracle begin, exec, exec sql, exec sql begin,
   exec sql type, exec sql var, exec sql include,

Error at line 0, column 0 in file stu.pc
PCC-F-02102, Fatal error while doing C preprocessing
[Linux:/si/usr/hrl]

当我添加parse=none并编译代码时,发现了有关头文件的错误,但是它出现了一些新的错误。

[Linux:/si/usr/hrl/gdetsdev/src/rtsc/dbsrc]make -f rtsc_db.mk
make -f proc.mk user_table_db.o \
                CCFLAGS="-m64" CFLAGS="-g -DRTSC_DEBUG -I. -I/home2/oracle/app/oracle/product/10.2.0/db/rdbms/demo -I/home2/oracle/app/oracle/product/10.2.0/db/rdbms/public -I/si/usr/hrl/gdetsdev/include/db -I/si/usr/hrl/gdetsdev/include/rtsc -I/si/usr/hrl/gdetsdev/include/rtsc/db -I/si/usr/hrl/gdetsdev/include/app -I/si/usr/hrl/gdetsdev/include/arch -I/si/usr/hrl/gdetsdev/include/arch -I/si/usr/hrl/gdetsdev/include/rtsc/app" PROCFLAGS="ireclen=132 oreclen=132 select_error=no ltype=none MAXOPENCURSORS=40 RELEASE_CURSOR=NO HOLD_CURSOR=YES include=/si/usr/hrl/gdetsdev/include/arch include=/si/usr/hrl/gdetsdev/include/rtsc include=/si/usr/hrl/gdetsdev/include/rtsc/app include=/si/usr/hrl/gdetsdev/include/rtsc/db include=/home2/oracle/app/oracle/product/10.2.0/db/rdbms/demo include=/home2/oracle/app/oracle/product/10.2.0/db/rdbms/public"
make[1]: Entering directory `/si/usr/hrl/gdetsdev/src/rtsc/dbsrc'
echo ".pc.c"
.pc.c
proc ireclen=132 oreclen=132 select_error=no ltype=none MAXOPENCURSORS=40 RELEASE_CURSOR=NO HOLD_CURSOR=YES include=/si/usr/hrl/gdetsdev/include/arch include=/si/usr/hrl/gdetsdev/include/rtsc include=/si/usr/hrl/gdetsdev/include/rtsc/app include=/si/usr/hrl/gdetsdev/include/rtsc/db include=/home2/oracle/app/oracle/product/10.2.0/db/rdbms/demo include=/home2/oracle/app/oracle/product/10.2.0/db/rdbms/public iname=user_table_db parse=none

Pro*C/C++: Release 10.2.0.4.0 - Production on Thursday Feb 18th 10:03:45 2016

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

System default option values taken from: /home2/oracle/app/oracle/product/10.2.0/db/precomp/admin/pcscfg.cfg

Semantic error at line 218, column 27, file user_table_db.pc:
                varchar hvs_encpasswd   [ V_ENCPASSWD_LEN + 1 ] ;
..........................1
PCC-S-02322, found undefined identifier
Semantic error at line 220, column 22, file user_table_db.pc:
                varchar hvs_key         [ V_MASTER_KEY_LEN + 1 ] ;
.....................1
PCC-S-02322, found undefined identifier
Semantic error at line 220, column 22, file user_table_db.pc:
                varchar hvs_key         [ V_MASTER_KEY_LEN + 1 ] ;
.....................1
PCC-S-02322, found undefined identifier
Semantic error at line 218, column 27, file user_table_db.pc:
                varchar hvs_encpasswd   [ V_ENCPASSWD_LEN + 1 ] ;
..........................1
PCC-S-02322, found undefined identifier
make[1]: *** [user_table_db.c] error 1
make[1]: Leaving directory `/si/usr/hrl/gdetsdev/src/rtsc/dbsrc'
make: *** [/si/usr/hrl/gdetsdev/lib/user_table_db.o] error 2

我喜欢我的ProC编译器是错误的还是我的gcc编译器没有正确安装。或者我使用了错误的编译句子?这让我困惑了很长时间。谢谢你的帮助。

0 个答案:

没有答案