野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 16466|回复: 2

头文件的问题

[复制链接]
发表于 2014-7-23 16:13:32 | 显示全部楼层 |阅读模式
点流水灯的那个 bsp_led.h中为啥这样写报错
#ifndef _BSP_LED_H_
#define _BSP_LED_H_
这样写就对呢?
#ifndef _LED_H_
#define _LED_H_
回复

使用道具 举报

发表于 2014-7-23 16:16:03 | 显示全部楼层
报什么错? 可能因为你其它文件已经使用了_BSP_LED_H_
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-7-23 16:16:42 | 显示全部楼层
Build target 'Template'
compiling core_cm3.c...
compiling system_stm32f10x.c...
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling main.c...
..\..\User\main.c(17): error:  #5: cannot open source input file "bsp_led.h": No such file or directory
..\..\User\main.c:   #include "bsp_led.h"
..\..\User\main.c:                       ^
..\..\User\main.c: ..\..\User\main.c: 0 warnings, 1 error
compiling stm32f10x_it.c...
compiling bsp_led.c...
Target not created
回复 支持 反对

使用道具 举报

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

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-9-23 03:33 , Processed in 0.038947 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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