找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 5377|回復(fù): 3
打印 上一主題 下一主題
收起左側(cè)

新手請(qǐng)教

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:25285 發(fā)表于 2010-7-27 11:27 | 只看該作者 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式

請(qǐng)各位大俠指導(dǎo)一下,下面程序的錯(cuò)誤在哪:

#include<eg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
uchar temp;
void delay();
void main()
{
  temp=0xfe;
  P1=temp;
 while(1)
 {
  temp=_crol_(temp,1);
  delay(600);
  P1=temp;
 }
}

void delay()
{
 uint x,y;
 for(x=100;x>0;x--)
  for(y=2000;y>0;y--); 
}

 

 

以下為錯(cuò)誤提示:

Build target 'Target 1'
assembling STARTUP.A51...
compiling 0727.c...
*** WARNING C318 IN LINE 1 OF 0727.c: can't open file 'eg52.h'
0727.C(4): error C202: 'P1': undefined identifier
0727.C(10): error C202: 'D1': undefined identifier
0727.C(12): error C202: 'D1': undefined identifier
compiling 07271.c...
*** WARNING C318 IN LINE 1 OF 07271.c: can't open file 'eg52.h'
07271.C(10): error C202: 'P1': undefined identifier
07271.C(15): error C202: 'P1': undefined identifier
Target not created

具體可以看附件。

謝謝各位指導(dǎo)!

 

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報(bào)

沙發(fā)
ID:1 發(fā)表于 2010-7-27 11:41 | 只看該作者

錯(cuò)在第一行 #include<reg52.h> 你掉了一個(gè) r

回復(fù)

使用道具 舉報(bào)

板凳
ID:24712 發(fā)表于 2010-7-27 22:19 | 只看該作者
LS真是一言驚醒夢(mèng)中人啊,難怪一看就覺(jué)得那里怪怪的呢
回復(fù)

使用道具 舉報(bào)

地板
ID:25285 發(fā)表于 2010-7-28 11:32 | 只看該作者

謝謝admin

回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表