Keil uVision 5.23.0.0 编译错误 C4065E
Posted
技术标签:
【中文标题】Keil uVision 5.23.0.0 编译错误 C4065E【英文标题】:Keil uVision 5.23.0.0 compilation error(s) C4065E 【发布时间】:2017-04-28 08:40:21 【问题描述】:我在Keil uVision version 5.23.0.0
中有一个针对STM32F103RC microcontroller 的项目,我的项目位于NTFS 文件系统上的C:\Projects\TestProj\LCDController\
下,在VMWare Player
中使用Windows 7 x64 Ultimate
作为Virtual Machine
。现在,当我尝试构建项目时,出现以下错误:
*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'LcdController'
creating preprocessor file for gpio.c...
compiling gpio.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for main.c...
compiling main.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for i2c.c...
compiling i2c.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_it.c...
compiling stm32f1xx_it.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for spi.c...
compiling spi.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_msp.c...
compiling stm32f1xx_hal_msp.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_dogm128_6.c...
compiling lcd_dogm128_6.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_dogm128_6_alphabet.c...
compiling lcd_dogm128_6_alphabet.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_srf06eb.c...
compiling lcd_srf06eb.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for system_stm32f1xx.c...
compiling system_stm32f1xx.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_flash.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_spi_ex.c...
compiling stm32f1xx_hal_spi_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_rcc.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_tim.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_cortex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_gpio.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_spi.c...
compiling stm32f1xx_hal_spi.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal_gpio_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_i2c.c...
compiling stm32f1xx_hal_i2c.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal.c...
compiling stm32f1xx_hal.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal_rcc_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_tim_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_pwr.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_dma.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_flash_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
assembling startup_stm32f103xe.s...
linking...
.\LcdController\LcdController.axf: error: L6002U: Could not open file .\lcdcontroller\gpio.o: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
".\LcdController\LcdController.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:04
Batch-Build summary: 0 succeeded, 1 failed, 0 skipped - Time Elapsed: 00:00:04
该错误与(我认为)Project Include paths
有关:
为什么我会收到这些错误,我该如何解决?现在,根据@LP 的评论,这是设置包含目录的过程:第 1 步 - 添加 Inc 目录
我正在通过Keil GUI
: 选择Inc
目录
当我选择C:\Projects\TestProj\LCDController\Inc
目录时,我的目录路径被截断为..\Inc.
:。可能是Keil
中的错误并且路径错误?其他两个包含目录也是如此。
【问题讨论】:
Inc
目录是否位于 C:\Projects\TestProj\Inc
?包含路径中的其他人也一样
@LP Inc
位于C:\Projects\UltraSound\LCDController\Inc
,扩展问题。
所以我认为..
是不正确的。 ..
表示上一级。你应该使用./Inc
。
这不是包含路径错误。如果是这样,您将收到“没有这样的文件/文件夹”错误。
@LPs 如果我将..
更改为.
,同样的错误仍然存在。
【参考方案1】:
我不知道会不会是这样,但这有时会奏效。
-
关闭项目
关闭 Keil
重新打开项目
这是因为 Keil 有很多内部错误。
【讨论】:
以上是关于Keil uVision 5.23.0.0 编译错误 C4065E的主要内容,如果未能解决你的问题,请参考以下文章
KEIL、uVision、RealView、MDK、KEIL C51有啥区别?
请问已破解的KEIL C166 uvision 3 出现了DEVICE IS NOT SUPPORT BY TOOLCHAIN. 怎么解决?