使用环境
- 操作系统版本:WIN10 22H2
- 操作系统平台(x86/x64):x64
- VsCode 版本:1.107.1
- EIDE 插件版本:3.26.1
- C/C++ 插件版本:1.29.3
- 编译器 arm-gnu-toolchain-15.2.rel1
描述问题
可以正常编译,但增量编译无效。unify_builder.log显示
[2026-01-11 12:49:12] [info] incremental build: 118 source files changed
These source files will be recompiled
'c:\Users\xxx\code\VS-xxx\Core\APP_Module\Inc\A_Func_Pack.c': check dependence failed, msg: no such file 'c:\Users\xxx\code\VS-xxx\Core\APP_Module\Inc\A_APP_Headers.h:'
...(原因类似,都是缺失头文件,但头文件确实存在)
附command line: -c -xc -std=gnu99 -I. -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -O0 -Wall -ffunction-sections -fdata-sections -fsigned-char --specs=nano.specs --specs=nosys.specs -g3 -DSTM32F765xx -DUSE_HAL_DRIVER -IDrivers/CMSIS/Include -IDrivers/CMSIS/Device/ST/STM32F7xx/Include -ICore/Inc -IDrivers/STM32F7xx_HAL_Driver/Inc -IDrivers/STM32F7xx_HAL_Driver/Inc/Legacy -fstack-usage -MP -o ./build/Debug/.obj/${c}.o -MMD ${c}
把项目路径里的-换成_也一样:
'c:\Users\xxx\code\VS_xxx\Core\APP_Module\Inc\A_Func_Pack.c': check dependence failed, msg: no such file 'c:\Users\xxx\code\VS_xxx\Core\APP_Module\Inc\A_APP_Headers.h:'
.d文件的头两行
build/Debug/.obj/Core/APP_Module/Inc/A_Func_Pack.o: \
Core/APP_Module/Inc/A_Func_Pack.c Core/APP_Module/Inc/A_APP_Headers.h \
期望现象
实现增量编译