#*** Using Compiler 'V5.05 update 1 (build 106)', folder: 'D:\keil\ARM\ARMCC\Bin'
compiling main.c..
.\Backup.004\C51\INC\reg51.h(13): error: #20: identifier "sfr" is undefined
sfr P0 = 0x80;
.\Backup.004\C51\INC\reg51.h(14): error: #20: identifier "sfr" is undefined
sfr P1 = 0x90;
.\Backup.004\C51\INC\reg51.h(15): error: #20: identifier "sfr" is undefined
sfr P2 = 0xA0;
.\Backup.004\C51\INC\reg51.h(16): error: #20: identifier "sfr" is undefined
sfr P3 = 0xB0;
.\Backup.004\C51\INC\reg51.h(17): error: #20: identifier "sfr" is undefined
sfr PSW = 0xD0;
.\Backup.004\C51\INC\reg51.h(18): error: #20: identifier "sfr" is undefined
sfr ACC = 0xE0;
.\Backup.004\C51\INC\reg51.h(19): error: #20: identifier "sfr" is undefined
sfr B = 0xF0;
.\Backup.004\C51\INC\reg51.h(20): error: #20: identifier "sfr" is undefined
sfr SP = 0x81;
.\Backup.004\C51\INC\reg51.h(21): error: #20: identifier "sfr" is undefined
sfr DPL = 0x82;
.\Backup.004\C51\INC\reg51.h(22): error: #20: identifier "sfr" is undefined
sfr DPH = 0x83;
.\Backup.004\C51\INC\reg51.h(23): error: #20: identifier "sfr" is undefined
sfr PCON = 0x87;
.\Backup.004\C51\INC\reg51.h(24): error: #20: identifier "sfr" is undefined
sfr TCON = 0x88;
.\Backup.004\C51\INC\reg51.h(25): error: #20: identifier "sfr" is undefined
sfr TMOD = 0x89;
.\Backup.004\C51\INC\reg51.h(26): error: #20: identifier "sfr" is undefined
sfr TL0 = 0x8A;
.\Backup.004\C51\INC\reg51.h(27): error: #20: identifier "sfr" is undefined
sfr TL1 = 0x8B;
.\Backup.004\C51\INC\reg51.h(28): error: #20: identifier "sfr" is undefined
sfr TH0 = 0x8C;
.\Backup.004\C51\INC\reg51.h(29): error: #20: identifier "sfr" is undefined
sfr TH1 = 0x8D;
.\Backup.004\C51\INC\reg51.h(30): error: #20: identifier "sfr" is undefined
sfr IE = 0xA8;
.\Backup.004\C51\INC\reg51.h(31): error: #20: identifier "sfr" is undefined
sfr IP = 0xB8;
.\Backup.004\C51\INC\reg51.h(32): error: #20: identifier "sfr" is undefined
sfr SCON = 0x98;
.\Backup.004\C51\INC\reg51.h(33): error: #20: identifier "sfr" is undefined
sfr SBUF = 0x99;
.\Backup.004\C51\INC\reg51.h(38): error: #20: identifier "sbit" is undefined
sbit CY = 0xD7;
.\Backup.004\C51\INC\reg51.h(39): error: #20: identifier "sbit" is undefined
sbit AC = 0xD6;
.\Backup.004\C51\INC\reg51.h(40): error: #20: identifier "sbit" is undefined
sbit F0 = 0xD5;
.\Backup.004\C51\INC\reg51.h(41): error: #20: identifier "sbit" is undefined
sbit RS1 = 0xD4;
.\Backup.004\C51\INC\reg51.h(42): error: #20: identifier "sbit" is undefined
sbit RS0 = 0xD3;
.\Backup.004\C51\INC\reg51.h(43): error: #20: identifier "sbit" is undefined
sbit OV = 0xD2;
.\Backup.004\C51\INC\reg51.h(44): error: #20: identifier "sbit" is undefined
sbit P = 0xD0;
.\Backup.004\C51\INC\reg51.h(47): error: #20: identifier "sbit" is undefined
sbit TF1 = 0x8F;
.\Backup.004\C51\INC\reg51.h(48): error: #20: identifier "sbit" is undefined
sbit TR1 = 0x8E;
main.c: 0 warnings, 30 errors
"main.c" - 30 Error(s), 0 Warning(s).
keil5编译程序运行后出现了这种问题怎么解决啊?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- 元气少女缘结神 2023-02-10 12:54关注
你是#include<reg51.h>吗?试下改成 #include "reg51.h" 或#include <REGX51.H>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报 编辑记录
悬赏问题
- ¥15 如何构建全国统一的物流管理平台?
- ¥100 ijkplayer使用AndroidStudio/CMake编译,如何支持 rtsp 直播流?
- ¥20 和学习数据的传参方式,选择正确的传参方式有关
- ¥15 这是网络安全里面的poem code
- ¥15 用js遍历数据并对非空元素添加css样式
- ¥15 使用autodl云训练,希望有直接运行的代码(关键词-数据集)
- ¥50 python写segy数据出错
- ¥20 关于线性结构的问题:希望能从头到尾完整地帮我改一下,困扰我很久了
- ¥30 3D多模态医疗数据集-视觉问答
- ¥20 设计一个二极管稳压值检测电路