#include <reg52.h>那错了??
#include<reg52.h>#include<intrins.h>#defineuintunsignedint#defineucharunsignedcharsbi...
#include <reg52.h>
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
sbit K1 = P3^0;
sbit K2 = P3^1;
sbit K3 = P3^2;
sbit LED1 = P0^0;
sbit LED2 = P0^1;
sbit LED3 = P0^2;
sbit MA = P1^0;
sbit MB = P1^1;
void main(void)
{
LED1 = 1;
LED2 = 1;
LED3 = 0;
while(1)
{
if(K1 == 0)
{
while(K1 == 0);
LED1 = 0;
LED2 = 1;
LED3 = 1;
MA = 0;
MB = 1;
}
if(K2 == 0)
{
while(K1 == 0);
LED1 = 1;
LED2 = 0;
LED3 = 1;
MA = 1;
MB = 0;
}
if(K3 == 0)
{
while(K1 == 0);
LED1 = 1;
LED2 = 1;
LED3 = 0;
MA = 0;
MB = 0;
}
}
}
*******************************************
--------------------Configuration: 26 - Win32 Debug--------------------
Compiling...
26.c
d:\26\26.c(1) : fatal error C1083: Cannot open include file: 'intrins.h': No such file or directory
执行 cl.exe 时出错.
26.obj - 1 error(s), 0 warning(s) 展开
#include <intrins.h>
#define uint unsigned int
#define uchar unsigned char
sbit K1 = P3^0;
sbit K2 = P3^1;
sbit K3 = P3^2;
sbit LED1 = P0^0;
sbit LED2 = P0^1;
sbit LED3 = P0^2;
sbit MA = P1^0;
sbit MB = P1^1;
void main(void)
{
LED1 = 1;
LED2 = 1;
LED3 = 0;
while(1)
{
if(K1 == 0)
{
while(K1 == 0);
LED1 = 0;
LED2 = 1;
LED3 = 1;
MA = 0;
MB = 1;
}
if(K2 == 0)
{
while(K1 == 0);
LED1 = 1;
LED2 = 0;
LED3 = 1;
MA = 1;
MB = 0;
}
if(K3 == 0)
{
while(K1 == 0);
LED1 = 1;
LED2 = 1;
LED3 = 0;
MA = 0;
MB = 0;
}
}
}
*******************************************
--------------------Configuration: 26 - Win32 Debug--------------------
Compiling...
26.c
d:\26\26.c(1) : fatal error C1083: Cannot open include file: 'intrins.h': No such file or directory
执行 cl.exe 时出错.
26.obj - 1 error(s), 0 warning(s) 展开
3个回答
展开全部
你安装的KEIL没有intrins.h没有这个文件!我看你的程序没用到intrins.h库啊?把它删掉就可以了。intrins.h我以前也遇到过这个问题,我现在用的是keil4。里面自带有。你可以查看一下它在D:\Program Files\Keil 4\C51\INC(当然这是我的安装目录INTRINS)
追问
我用的 Visual C++ 打开的 我去掉intrins.h 还是错的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
intrins.h没有这个头文件
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询