单片机c编程:*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
程序:#include<reg52.h>voidmian(){while(1){while(!RI);//检测是否收到数据若收到则RI=1RI=0;//清零P1=0xfe...
程序:
#include<reg52.h>
void mian()
{
while(1)
{
while(!RI); //检测是否收到数据 若收到则RI=1
RI=0; //清零
P1=0xfe;// 点亮P1口第一个发光二级管
}
}
Build target 'Target 1'
assembling STARTUP.A51...
compiling lesson7----.c...
linking...
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MIAN?LESSON7____
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: MAIN
MODULE: E:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: MAIN
MODULE: E:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
ADDRESS: 0010H
Program Size: data=9.0 xdata=0 code=154
"lesson7----" - 0 Error(s), 3 Warning(s). 展开
#include<reg52.h>
void mian()
{
while(1)
{
while(!RI); //检测是否收到数据 若收到则RI=1
RI=0; //清零
P1=0xfe;// 点亮P1口第一个发光二级管
}
}
Build target 'Target 1'
assembling STARTUP.A51...
compiling lesson7----.c...
linking...
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MIAN?LESSON7____
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: MAIN
MODULE: E:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: MAIN
MODULE: E:\KEIL\C51\LIB\C51S.LIB (?C_INIT)
ADDRESS: 0010H
Program Size: data=9.0 xdata=0 code=154
"lesson7----" - 0 Error(s), 3 Warning(s). 展开
2个回答
展开全部
你的 void mian() 写错了,应该是void main() 改正后就没错了,希望能悄腊兆局手帮到你。启租
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询