keil 编译问题,下面是程序
#include<AT89C51.h>#include<stdio.h>voidmain(void){SCON=0x50;TMOD=0x20;TCON=0x40;TH1=...
#include<AT89C51.h>
#include<stdio.h>
void main(void)
{
SCON =0x50;
TMOD =0x20;
TCON =0x40;
TH1 =0xE8;
TL1 =0xE8;
TI =1;
TR1 =1;
while(1)
{
printf("Hello World!\n");
}
}
编译时出现错误compiling Text2.c...
*** WARNING C318 IN LINE 1 OF Text2.c: can't open file 'AT89C51.h'
TEXT2.C(6): error C202: 'SCON': undefined identifier
TEXT2.C(7): error C202: 'TMOD': undefined identifier
TEXT2.C(8): error C202: 'TCON': undefined identifier
TEXT2.C(9): error C202: 'TH1': undefined identifier
TEXT2.C(10): error C202: 'TL1': undefined identifier
TEXT2.C(11): error C202: 'TI': undefined identifier
TEXT2.C(12): error C202: 'TR1': undefined identifier
Text2.c - 8 Error(s), 0 Warning(s).怎么回事呢?
详细说一下,刚学不知道,谢谢 展开
#include<stdio.h>
void main(void)
{
SCON =0x50;
TMOD =0x20;
TCON =0x40;
TH1 =0xE8;
TL1 =0xE8;
TI =1;
TR1 =1;
while(1)
{
printf("Hello World!\n");
}
}
编译时出现错误compiling Text2.c...
*** WARNING C318 IN LINE 1 OF Text2.c: can't open file 'AT89C51.h'
TEXT2.C(6): error C202: 'SCON': undefined identifier
TEXT2.C(7): error C202: 'TMOD': undefined identifier
TEXT2.C(8): error C202: 'TCON': undefined identifier
TEXT2.C(9): error C202: 'TH1': undefined identifier
TEXT2.C(10): error C202: 'TL1': undefined identifier
TEXT2.C(11): error C202: 'TI': undefined identifier
TEXT2.C(12): error C202: 'TR1': undefined identifier
Text2.c - 8 Error(s), 0 Warning(s).怎么回事呢?
详细说一下,刚学不知道,谢谢 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询