请问出现这样的错误d:\Keil\C51\Inc\STC\stc15f2k60s2.h(16): error C231: 'ACC': redefinition怎么解决
使用的单片机是stc15W401ASbatteryadc.c的头文件如下//#include<reg51.h>#include"intrins.h"#include"ua...
使用的单片机是stc15W401AS
batteryadc.c的头文件如下
//#include <reg51.h>
#include "intrins.h"
#include "uart.h"
#include "type.h"
#include "batteryadc.h"
keil编译整个工程文件时出现如下问题:
Build target 'Target 1'
compiling batteryadc.c...
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(16): error C231: 'ACC': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(17): error C231: 'B': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(18): error C231: 'PSW': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(19): error C231: 'CY': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(20): error C231: 'AC': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(21): error C231: 'F0': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(22): error C231: 'RS1': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(23): error C231: 'RS0': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(24): error C231: 'OV': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(25): error C231: 'P': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(26): error C231: 'SP': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(27): error C231: 'DPL': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(28): error C231: 'DPH': redefinition 展开
batteryadc.c的头文件如下
//#include <reg51.h>
#include "intrins.h"
#include "uart.h"
#include "type.h"
#include "batteryadc.h"
keil编译整个工程文件时出现如下问题:
Build target 'Target 1'
compiling batteryadc.c...
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(16): error C231: 'ACC': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(17): error C231: 'B': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(18): error C231: 'PSW': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(19): error C231: 'CY': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(20): error C231: 'AC': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(21): error C231: 'F0': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(22): error C231: 'RS1': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(23): error C231: 'RS0': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(24): error C231: 'OV': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(25): error C231: 'P': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(26): error C231: 'SP': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(27): error C231: 'DPL': redefinition
d:\Keil\C51\Inc\STC\stc15f2k60s2.h(28): error C231: 'DPH': redefinition 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询