Keil uVision 5.23.0.0 编译错误 C4065E
Keil uVision 5.23.0.0 compilation error(s) C4065E
我在 Keil uVision version 5.23.0.0
中有一个用于 STM32F103RC microcontroller 的项目,我的项目位于 NTFS 文件系统的 C:\Projects\TestProj\LCDController\
下,使用 Windows 7 x64 Ultimate
作为 Virtual Machine
在 VMWare Player
。现在,当我尝试构建项目时,出现以下错误:
*** 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 的评论,这是设置 Include dirs:
的过程
第 1 步 - 添加 Inc 目录
我正在 selecting Inc
目录通过 Keil GUI
:
当我 select C:\Projects\TestProj\LCDController\Inc
目录时,我的目录路径被截断为 ..\Inc.
:。可能是 Keil
中的错误并且路径错误?其他两个包含目录也是如此。
我不知道是否会这样,但这有时会奏效。
- 关闭项目
- 关闭Keil
- 重新打开项目
这是因为Keil有很多内部错误。
我在 Keil uVision version 5.23.0.0
中有一个用于 STM32F103RC microcontroller 的项目,我的项目位于 NTFS 文件系统的 C:\Projects\TestProj\LCDController\
下,使用 Windows 7 x64 Ultimate
作为 Virtual Machine
在 VMWare Player
。现在,当我尝试构建项目时,出现以下错误:
*** 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
有关:
的过程
第 1 步 - 添加 Inc 目录
我正在 selecting Inc
目录通过 Keil GUI
:C:\Projects\TestProj\LCDController\Inc
目录时,我的目录路径被截断为 ..\Inc.
:Keil
中的错误并且路径错误?其他两个包含目录也是如此。
我不知道是否会这样,但这有时会奏效。
- 关闭项目
- 关闭Keil
- 重新打开项目
这是因为Keil有很多内部错误。