2022-07-05 02:17 PM
I've created an STM32 Project, selected the NUCLEO-G431RB board and generated the code. I've added a source folder to the project (mu_platform) and LINKED some .c and .h files into that folder.
I selected mu_platform folder and right-clicked "Add/remove include path", and checked the project properties to see that it was added. It looked right:
But now when I compile, the C preprocessor says that it cannot find the .h files inside mu_platform, e.g. mu_time.h, although it's linked into the mu_platform directory:
C:/Users/r/Projects/mulib-examples/mu_platform/nucleo_g431rb/mu_time.c:28:10: fatal error: mu_time.h: No such file or directory
28 | #include "mu_time.h"
Is this because the C preprocessor does not resolve LINKED files? In other words, do I need to specify the file system directory as the included directory rather than the Project Directory's linked directory?
(Hope this makes sense!)
Solved! Go to Solution.
2022-07-05 02:37 PM
After some experimentation, I've answered my own question: the C preprocessor doesn't know about the symbolic links that Eclipse has created in the Project Directory. (This actually makes sense: if you look at the mu_platform directory in the File Explorer, you'll see that it's empty. Presumably the C preprocessor will see the same thing...)
In this specific case, the proper settings for the Include Directory ended up being this:
2022-07-05 02:37 PM
After some experimentation, I've answered my own question: the C preprocessor doesn't know about the symbolic links that Eclipse has created in the Project Directory. (This actually makes sense: if you look at the mu_platform directory in the File Explorer, you'll see that it's empty. Presumably the C preprocessor will see the same thing...)
In this specific case, the proper settings for the Include Directory ended up being this:
2022-07-06 12:56 AM
@Robert Poor "I've answered my own question"
Please mark your solution:
2022-07-06 06:48 AM
Duly noted and done -- thank you.