2022-11-28 06:10 AM
Hi all I am working in a project where i need to add the folder with .c and .h files combined in it to the project file i have pasted the folder in the project folder and refreshed the project explorer so i got the folder in the project explorer. Then I went to the project properties->c/c++Genral->paths and symbols -> includes ->gnu c and added the folder as a workspace
but when i try to add this mstimmer.h which is in the folder which i added the error comes as "fatal error no such file or directory". The screen shot of the error and the code is below. Any thoughts kindly share..
Thankyou.
2022-11-29 07:31 AM
Hello @NJP.1,
I am not an STM32CubeIDE expert, but it seems you are not properly including the files/updating the include paths.
Please refer to the "Figure 93. Add library header files to the include paths" and notes below of the STM32CubeIDE user guide.
Thank you.
Chahinez.
2022-11-29 09:04 AM
Eclipse is too smart for intuitiveness.
When you add files in IAR, sure it is source code to be added to the project.
In cubeIDE you must care for add SOURCE file and not add file, so they are added to the makefile.
Now in the project Settings you need to add the new folders to the compiler file search list.
if your directory has other file type than .c and .h (even uppercase!), get ready to spend the night facing your screen...
2022-11-29 12:47 PM
Hi,
This can be because your include directive in C file refers to "bacnet/abort.h"
and you have the bacnet directory in include paths.
Then the compiler actually tries to access bacnet/bacnet/abort.h.
So either include just "abort.h", or add the parent directory of bacnet to the include paths.