Proc*C 编译错误

发布于 2024-12-28 04:24:05 字数 1594 浏览 5 评论 0原文

我正在尝试使用以下预编译器选项在 Red Hat Linux v4.1.2-44(能够在 HP 和 Solaris 上编译)上编译 .pc 文件:

PROCFLAGS=*< em>maxopencursors*=100 PARSE=NONE userid=db2poc/db2poc@mydb VARCHAR=YES 代码=CPP CPP_SUFFIX=cpp 持续时间=会话sqlcheck=完整包含=/ app1/myuser/应用程序/源/标头SYS_INCLUDE=/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/rdbms/public,/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/precomp/public ,/o radata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/rdbms/plsql/public,/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/xdk/include,/usr/include/c++/ 3.4.6/向后

问题是,只要 EXEC SQL DECLARE SECTION 中存在宏或 typedef 数据类型,它就会抛出一个错误,指出 PCC-S-02322,发现未定义的标识符 for >宏,并在 typedef 数据类型的情况下抛出以下错误:

PCC-S-02201,在期望以下之一时遇到符号“SHORT”以下:

auto、char、const、double、enum、extern、float、int、long *ulong_varchar,OCIBFileLocator OCIBlobLocator,* OCIClobLocator、OCIDateTime、OCIExtProcContext、OCIInterval OCIRowid、OCIDate、OCINumber、OCIRaw、OCIString、寄存器 *短,有符号,sql_context,sql_cursor,静态,结构,* typedef、union、unsigned、utext、uvarchar、varchar、void 易失性,一个 typedef 名称,一个预编译头,exec oracle, 执行oracle开始,执行,执行sql,执行sql开始, exec sql end、exec sql type、exec sql var、exec sql include、

符号“enum”被替换为“SHORT”以继续。

请提出建议。谢谢

I'm trying to compile .pc file on Red Hat Linux v4.1.2-44 (able to compile on HP and Solaris) with following precompiler options:

PROCFLAGS=*maxopencursors*=100 PARSE=NONE userid=db2poc/db2poc@mydb VARCHAR=YES code=CPP CPP_SUFFIX=cpp duration=session sqlcheck=full include=/app1/myuser/Application/Source/Header SYS_INCLUDE=/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/rdbms/public,/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/precomp/public,/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/rdbms/plsql/public,/oradata1/ora11g/app/ora11g/product/11.2.0/dbhome_1/xdk/include,/usr/include/c++/3.4.6/backward

The problem is, wherever there is a macro or typedef data type in EXEC SQL DECLARE SECTION, it throws an error saying PCC-S-02322, found undefined identifier for macros and throws the following error in case of typedef data types:

PCC-S-02201, Encountered the symbol "SHORT" 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 end, exec sql type, exec sql var, exec sql include,

The symbol "enum," was substituted for "SHORT" to continue.

Please suggest. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

開玄 2025-01-04 04:24:05

您可以首先使用 c 预编译器预编译源代码:

cpp -P -E yourfile.src -o yourfile.dst

然后您将得到解压的宏。

需要 -P 选项,因为 Pro*C 是可能与行标记混淆的程序。

需要 -E 选项,因为 Pro*C 是可能与非传统输出混淆的程序。

You may first precompile your source with c precompiler:

cpp -P -E yourfile.src -o yourfile.dst

Then you will get macros unpacked.

-P option is needed because Pro*C is the program which can be confused with linemarkers.

-E option is needed because Pro*C is the program which can be confused with non-traditional output.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文