c - Oracle Pro*C 预编译器错误 PCC-S-02201 : Encountered the symbol "_Bool"

标签 c linux oracle gcc oracle-pro-c

现有程序正在从 AIX 转换到 RedHat Linux。 Oracle Pro*C 在预编译时导致问题。 bool typedef 的文件 cursesh.h 发生编译错误。

预编译配置:

sys_include=($ORACLE_HOME/precomp/public,$ORACLE_HOME/precomp/syshdr,/usr/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include)
ltype=short
define=__x86_64__

包含路径与 gcc 编译器路径匹配。

请帮我解决编译错误。我是否需要在 sys_include 中包含任何其他预处理器符号或缺少任何内容?

Pro*C/C++: Release 12.1.0.1.0 - Production on Thu Jan 23 10:29:54 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /opt/oracle/product/12.1.0/precomp/admin/pcscfg.cfg

Syntax error at line 374, column 2, file /usr/include/curses.h:
Error at line 374, 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,

PCSCFG.CFG:

$ more /opt/oracle/product/12.1.0/precomp/admin/pcscfg.cfg

sys_include=($ORACLE_HOME/precomp/public,/usr/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include)
ltype=short
define=__x86_64__

最佳答案

您应该将以下内容添加到您的 pcscfg.cfg

code=ansi

您还可以将编译器标志 CODE=ANSI_C 设置为您的 PROC-Flags

关于c - Oracle Pro*C 预编译器错误 PCC-S-02201 : Encountered the symbol "_Bool",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21314162/

相关文章:

python - 在 cron 作业期间在子 shell 中引用 Python 3.7.3

oracle - 如何管理禁用/启用 Oracle 表单中的最小化、调整大小和关闭按钮?

C - 头文件中的结构体定义

c - 何时在指针分配中使用*?

linux - 当我在 Qt 中通过 QProcess 调用脚本时,很少有 shell 命令不起作用

sql - SQL*Plus Oracle 中的列格式化

sql - Oracle左外连接,只需要空值

c - matlab/simulink 中用于 keil 程序的遗留代码

c - bind() 返回权限被拒绝 C

python - 如何在线程后继续代码?对这段代码的流程感到困惑