请各位大侠指导一下,下面程序的错误在哪:
#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--);
}
以下为错误提示:
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
具体可以看附件。
谢谢各位指导!
错在第一行 #include<reg52.h> 你掉了一个 r
谢谢admin
欢迎光临 (http://www.51hei.com/bbs/) | Powered by Discuz! X3.1 |