求助, pro*c 和gcc编译都没问题, buildserver出错
[oracle@Tux10M simpapp]$ buildserver -f fetch.c -o fetch -s FETCH
fetch.c:147:20: sqlcpr.h: No such file or directory
CMDTUX_CAT:1832: ERROR: can't execute cc -m32 -I$TUXDIR/include -o fetch BS-5366.c -L${TUXDIR}/lib fetch.c -ltux -lbuft -lfml -lfml32 -lengine -ldl -lpthread
[oracle@Tux10M simpapp]$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
***************************my .pc file like below
[oracle@Tux10M simpapp]$ more fetch.pc
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sqlda.h>
#include <sqlcpr.h>
#include <atmi.h>
#include <fml.h>
#include <userlog.h>
/* config pro*c operation */
EXEC SQL INCLUDE sqlca;
EXEC SQL INCLUDE oraca;
EXEC ORACLE OPTION(oraca=yes);
/* define constants for varchar length*/
#define UNAME_LEN 20
#define PWD_LENTH 40
/* declare variable, no declare section is needed, if MODE=ORACLE */
VARCHAR username[UNAME_LEN];
varchar password[PWD_LENTH];/*varchar is an oracle-supplied struct, can be lower and upper case*/
/* declare error handling function*/
void sql_error(char *msg)
{
char err_msg[128];
size_t buf_len, msg_len;
EXEC SQL WHENEVER SQLERROR CONTINUE;
printf("n %s n", msg);
buf_len = sizeof(err_msg);
sqlglm(err_msg, &buf_len, &msg_len);
if(msg_len > buf_len)
{
msg_len = buf_len;
}
printf("%.*sn", msg_len, err_msg);
EXEC SQL ROLLBACK RELEASE;
exit(1);
}
main()
{
EXEC SQL INCLUDE sqlca;
EXEC ORACLE OPTION(RELEASE_CURSOR = YES);
/* register the sql_error() as the error handler*/
EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error-- n");
EXEC SQL BEGIN DECLARE SECTION;
char oraCN[50];
EXEC SQL END DECLARE SECTION;
strcpy(oraCN, "scott/scott@jerry");
EXEC SQL CONNECT :oraCN;
printf("n Connected to ORACLE as user: %s n", oraCN);
/* disconnect from ORACLE*/
EXEC SQL ROLLBACK WORK RELEASE;
return 0;
}
[oracle@Tux10M simpapp]$