首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

请教:一个proc程序s1.pc, 它的相应头文件为s1.h, s1.pc包含s1.h 这种情况下怎样将s1.pc预编译为s1.c啊

2012-02-26 
请问:一个proc程序s1.pc, 它的相应头文件为s1.h, s1.pc包含s1.h这种情况下怎样将s1.pc预编译为s1.c啊?我用

请问:一个proc程序s1.pc, 它的相应头文件为s1.h, s1.pc包含s1.h 这种情况下怎样将s1.pc预编译为s1.c啊?
我用proc iname=s1.pc oname=s1.c 后、
碰到sql句子就有问题,好像完成不能识别sql关键字

错误为
System default option values taken from: /oracle/8.1.7/precomp/admin/pcscfg.cfg

Semantic error at line 14, column 20, file s1.pc:
  EXEC SQL CONNECT :username IDENTIFIED BY :password;
...................1
PCC-S-02322, found undefined identifier
Semantic error at line 14, column 44, file s1.pc:
  EXEC SQL CONNECT :username IDENTIFIED BY :password;
...........................................1
PCC-S-02322, found undefined identifier

[解决办法]
http://www.orafaq.com/forum/t/35866/0/

Had similar problem. For your example I used

EXEC SQL BEGIN DECLARE SECTION;

#define ID_SIZE 80
const int ID_OTHERWAY_SIZE = 80;

EXEC SQL END DECLARE SECTION;

Now its in ORACLE scope. You could also the sample const as well. My problem was getting a ton of these into a separate include file to be shared by all. I am using an 8.x version so not sure of support in 9.x 

================================
老兵拷贝机:)

热点排行