免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2062 | 回复: 1
打印 上一主题 下一主题

[C] 在aix中pro C编译出错,请求大神帮助 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-01-06 18:36 |只看该作者 |倒序浏览
本帖最后由 ViolaHe 于 2016-01-06 18:47 编辑

        cc  -q64 -DSS_64BIT_SERVER -g -I/usr/include -I/usr/include/sys -I. -I/account1/src/include -I/account1/src/syndata/include -I/oraclenew/OraHome_1/precomp/public -I/oraclenew/OraHome_1/rdbms/public -I/oraclenew/OraHome_1/rdbms/demo -I/oraclenew/OraHome_1/plsql/public -I/oraclenew/OraHome_1/network -c AcctFunc.c
        /oraclenew/OraHome_1/bin/proc include=/account1/src/include include=/account1/src/syndata/include include=/oraclenew/OraHome_1/precomp/public include=/oraclenew/OraHome_1/rdbms/public include=/oraclenew/OraHome_1/rdbms/demo include=/oraclenew/OraHome_1/plsql/public include=/oraclenew/OraHome_1/network SQLCHECK=FULL userid='' DYNAMIC=ANSI oraca=yes  THREADS=YES iname=AcctDataBase

Pro*C/C++: Release 10.2.0.4.0 - Production on Wed Jan 6 17:54:42 2016

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

System default option values taken from: /oraclenew/OraHome_1/precomp/admin/pcscfg.cfg

Syntax error at line 768, column 38, file /usr/include/sys/ras.h:
Error at line 768, column 38 in file /usr/include/sys/ras.h
#define AVOWX(_cond, _kerrno, _data, ... /* detail data*/)              \
.....................................1
PCC-S-02014, Encountered the symbol "..." when expecting one of the following:

   an identifier, define, elif, else, endif, error, if, ifdef,
   ifndef, include, line, pragma, undef, exec, sql, begin, end,
   var, type, oracle, an immediate preprocessor command,
   a C token, create, function, package, procedure, trigger, or,
   replace,

Syntax error at line 775, column 2, file /usr/include/sys/ras.h:
Error at line 775, column 2 in file /usr/include/sys/ras.h
#endif /* !defined(__cplusplus) && ... */
.1
PCC-S-02014, Encountered the symbol "endif" when expecting one of the following:

   a numeric constant, newline, define, error, if, ifdef,
   ifndef, include, line, pragma, undef,
   an immediate preprocessor command, a C token,

make: The signal code from the last command is 11.


Stop.

在网路上看到有的编译错误类似,但采用各种改法都不能解决,请问这个到底是属于什么问题呢?

论坛徽章:
0
2 [报告]
发表于 2016-02-25 18:07 |只看该作者
这个和编译的参数设置有关,添加了 define=_POSIX_SOURCE
最终的编译设置为
proc define=_POSIX_SOURCE  include=/account1/src/include include=/account1/src/syndata/include include=/oraclenew/OraHome_1/precomp/public include=/oraclenew/OraHome_1/rdbms/public include=/oraclenew/OraHome_1/rdbms/demo include=/oraclenew/OraHome_1/plsql/public include=/oraclenew/OraHome_1/network SQLCHECK=FULL userid='dbaccadm/DBA_cca_11@accdb' DYNAMIC=ANSI oraca=yes THREADS=YES iname=AcctDataBase
便可成功编译,但最原始的原因还是因为Pro C程序写的不够好,存在非标准的写法
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP