c语言.h和.c连接错误,pro*c程序编译连接系统头文件math.h出错

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include

#include     /*重点,大家注意*/

EXEC  SQL  BEGIN  DECLARE     SECTION;

VARCHAR    username[20];

VARCHAR    password[20];

varchar    db_name[20];

char       db_link_name[10];

EXEC  SQL  END  DECLARE   SECTION;

main(int  argc,char   *argv[])

{

int                nMon, nDay, nYear, nHour, nMin, nSec;

char            sTime[12];

char                sCode[6],sBrno[6],sTelno[6]; int

i,nWrite=0,nTrcode,nRead=0,j=1;

char                trxsqnb[6],trxsqns[4],balance[18];

char                 servno[10];

char                 tmpstr[100];

int                commlen;

long                sType;

char                *sHostData;

FILE                *fp;

struct         tm        *ts ;

time_t                tnum ;

char                errtmp[301],errtxt[280],errcode[5],path[51];

int                errflag=2,errloop=0;

char                tmp_year[5],tmp_month[3],tmp_day[3];

char             *ft;

int              aflag=0;

char             buffer[1024];

int              nflag=0,mflag=0;

char             bserialno[20];

char             bflag[1];

char   ac_date[20];

EXEC SQL BEGIN DECLARE SECTION;

int    number=0;

char   name[30];

char   sex[10];

char   age[20];

char   job[20];

int    fine;

int    num=0;

char   date[20];

EXEC SQL END DECLARE SECTION;

time(&tnum);

ts=localtime(&tnum);

nHour=ts->tm_hour;

nMin=ts->tm_min;

nSec=ts->tm_sec;

sprintf(sTime,"%02d:%02d:%02d",nHour,nMin,nSec);

while(1)

{

/***************打开数据库**********************/

strcpy((char *)username.arr,"lxs&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

username.len=strlen((char *)username.arr);

strcpy((char  *)password.arr,"lxs&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

password.len=strlen((char *)password.arr);

strcpy((char *)db_name.arr,"test&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

db_name.len=strlen((char *)db_name.arr);

strcpy(db_link_name,"oracle1&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

EXEC SQL  CONNECT :username  IDENTIFIED  BY

4f06a01a81d5603cca001c0e92e5ebda.gifassword    /*AT :db_link_name*/

USING :db_name;

if (sqlca.sqlcode!=0)

{

printf("%s\n","连接数据库失败&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

break;

}

while(1)

{

EXEC  SQL   insert  into  agent  values(1,'lss','male','computer',26);

printf("sqlca.sqlcode=%d\n",sqlca.sqlcode);

if (sqlca.sqlcode!=0)

{

printf("%s\n","插入数据库出错&quot

9f7588d3b12cd5d674b5f81c0b8fc6cb.gif;

EXEC  SQL  rollback  work;

break;

}

EXEC  SQL  commit;

if   (1)

break;

}

if (1)

break;

}  /*while结束*/

EXEC SQL commit work release;

}

这个程序就是实现一个简单的插入功能,如果我在前面不包含头文件,就不报错,程序运行也没错,但是一旦我的程序中涉及到平方或开方这样的算术问题,又算不对,饱含以后给我报错:

Syntax error at line 220, column 1, file /usr/include/bits/mathcalls.h:

Error at line 220, column 1 in file /usr/include/bits/mathcalls.h

__MATHCALL (y1,, (_Mdouble_));

1

PCC-S-02201, Encountered the symbol "f" when expecting one of the following:

; , = ( [

Syntax error at line 220, column 1, file /usr/include/bits/mathcalls.h:

Error at line 220, column 1 in file /usr/include/bits/mathcalls.h

__MATHCALL (y1,, (_Mdouble_));

1

PCC-S-02201, Encountered the symbol "f" when expecting one of the following:

; , = ( [

以上这种类似的错很多,有谁知道这是咋回事?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值