2024-01-25 01:17 AM
I have a source folder named components where each subfolder has a .c and a .h file, see screenshot below.
I am trying to include these files, but they cannot be found. So far, I know that I should add the relative path and so I did. (I also tried to replace the ../ with the ./ in the #include).
How to solve?
Solved! Go to Solution.
2024-01-25 02:30 AM
Solution:
Project -> Properties -> C/C++ Build -> Settings -> MCU GCC Compiler -> Include paths and I added ../components
At this point, I can include the headers inside the components folder with e.g.
#include "blink/blink_main.h"
2024-01-25 02:30 AM
Solution:
Project -> Properties -> C/C++ Build -> Settings -> MCU GCC Compiler -> Include paths and I added ../components
At this point, I can include the headers inside the components folder with e.g.
#include "blink/blink_main.h"
2024-01-25 02:37 AM
Note that you can also specify a folder as an Include Path by right-clicking in the Project Explorer: