找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 9616|回复: 23
收起左侧

基于51单片机的红外智能风扇程序+电路 超简单

  [复制链接]
ID:808399 发表于 2020-8-26 08:27 | 显示全部楼层
compiling main.c...
main.c(1): warning C318: can't open file 'STC12C5A60S2.H'
main.c(2): warning C318: can't open file 'stc_pwm.H'
main.c(12): error C202: 'P1': undefined identifier
main.c(13): error C202: 'P3': undefined identifier
main.c(14): error C202: 'P3': undefined identifier
main.c(21): error C202: 'P3': undefined identifier
main.c(22): error C202: 'P2': undefined identifier
main.c(23): error C202: 'P1': undefined identifier
main.c(24): error C202: 'P1': undefined identifier
main.c(25): error C202: 'P1': undefined identifier 打开源码进行编译,  这么多变量没有定义,如何解决。。。。。。
回复

使用道具 举报

ID:808399 发表于 2020-8-26 13:42 | 显示全部楼层
在keil中,把#include<STC12C5A60S2.H>头文件改成   #include<reg51.H>后,两百多个提示错误,变成了36个,但main.c(2): warning C318: can't open file 'stc_pwm.H'
main.c(116): error C202: 'CCON': undefined identifier
main.c(117): error C202: 'CL': undefined identifier
main.c(118): error C202: 'CH': undefined identifier
main.c(119): error C202: 'CMOD': undefined identifier
main.c(120): error C202: 'CCAPM1': undefined identifier
main.c(121): error C202: 'CCAP1H': undefined identifier
main.c(122): error C202: 'CCAP1L': undefined identifier
main.c(123): error C202: 'CR': undefined identifier
main.c(239): error C202: 'CCAP1H': undefined identifier
main.c(240): error C202: 'CCAP1L': undefined identifier
main.c(255): error C202: 'CCAP1H': undefined identifier
main.c(256): error C202: 'CCAP1L': undefined identifier
main.c(309): error C202: 'CCAP1H': undefined identifier
main.c(310): error C202: 'CCAP1L': undefined identifier
main.c(325): error C202: 'CCAP1H': undefined identifier
main.c(326): error C202: 'CCAP1L': undefined identifier
main.c(344): error C202: 'CCAP1H': undefined identifier
main.c(345): error C202: 'CCAP1L': undefined identifier
main.c(348): error C202: 'CCAP1H': undefined identifier
main.c(349): error C202: 'CCAP1L': undefined identifier
main.c(352): error C202: 'CCAP1H': undefined identifier
main.c(353): error C202: 'CCAP1L': undefined identifier
main.c(356): error C202: 'CCAP1H': undefined identifier
main.c(357): error C202: 'CCAP1L': undefined identifier
main.c(360): error C202: 'CCAP1H': undefined identifier
main.c(361): error C202: 'CCAP1L': undefined identifier
main.c(364): error C202: 'CCAP1H': undefined identifier
main.c(365): error C202: 'CCAP1L': undefined identifier
main.c(464): error C202: 'CCAP1H': undefined identifier
main.c(465): error C202: 'CCAP1L': undefined identifier
main.c(472): error C202: 'CCAP1H': undefined identifier
main.c(473): error C202: 'CCAP1L': undefined identifier
main.c(480): error C202: 'CCAP1H': undefined identifier
main.c(481): error C202: 'CCAP1L': undefined identifier
main.c(488): error C202: 'CCAP1H': undefined identifier
main.c(489): error C202: 'CCAP1L': undefined identifier
main.c - 36 Error(s), 1 Warning(s).这些如何解决?请高人指点下。。。
回复

使用道具 举报

ID:808399 发表于 2020-8-26 13:56 | 显示全部楼层
我把stc12c5A60s2.H的头文件改成了      reg51.H      编译时从200个错误,变成了main.c - 36 Error(s), 1 Warning(s).    这个头文件如何处里?如下main.c(2): warning C318: can't open file 'stc_pwm.H'
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表