Feb-15-2025, 12:58 PM
Hello everyone,
I'm currently writing a Python script that can read C files from a directory and use GCC to compile them, placing the resulting file in a specified directory. I have attached a .py file showcasing my implementation. However, I am encountering an issue where the header files are not being automatically included, resulting in repeated errors throughout the C files.
For example: D:..\Core\Src\system_stm32f1xx.c:58:10: fatal error: stm32f1xx.h: No such file or directory
58 | #include "stm32f1xx.h"
| ^~~~~~~~~~~~~
Could anyone please help me resolve this issue?
Thank you in advance!
here is the code
GCC.py (Size: 1.24 KB / Downloads: 52)
I'm currently writing a Python script that can read C files from a directory and use GCC to compile them, placing the resulting file in a specified directory. I have attached a .py file showcasing my implementation. However, I am encountering an issue where the header files are not being automatically included, resulting in repeated errors throughout the C files.
For example: D:..\Core\Src\system_stm32f1xx.c:58:10: fatal error: stm32f1xx.h: No such file or directory
58 | #include "stm32f1xx.h"
| ^~~~~~~~~~~~~
Could anyone please help me resolve this issue?
Thank you in advance!
here is the code