用proc预处理c++测试程序时出现了错误:
环境:
AIX6.1,oracle10g
myconfig.cfg:
- include=(${ORACLE_HOME}/precomp/include)
- sys_include=(/usr/include)
- define=_LONG_LONG
- define=_IBM_C
- define=__64BIT__
预处理命令:
proc iname=proc.pc oname=proc.c config=myconfig.cfg
出错信息如下:
Syntax error at line 148, column 2, file /usr/include/standards.h:
Error at line 135, column 2 in file /usr/include/standards.h
#warning The -qdfp option is required to process DFP code in headers.
.1
原因:
解决方法:
1.直接修改 /usr/include/standards.h
- #if defined(__IBM_PP_WARNING)
- #warning The -qdfp option is required to process DFP code in headers.
- #else
- #error The -qdfp option is required to process DFP code in headers.
- #endif
- into:
- #if !defined(__IBM_PP_WARNING)
- #error The -qdfp option is required to process DFP code in headers.
- #endif
2.如果没有权限,修改后另存到其它地方,proc处理时加入 sys_include 选项指定即可。我采用的是第二种方法,另存到了应用程序所在目录。
我修改后放入c++程序所在目录
修改后的myconfig.cfg:
- include=(${ORACLE_HOME}/precomp/include)
- sys_include=.
- sys_include=(/usr/include)
- define=_LONG_LONG
- define=_IBM_C
- define=__64BIT__
预处理命令:
proc iname=proc.pc oname=proc.c config=myconfig.cfg
阅读(5096) | 评论(0) | 转发(0) |