cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a folder with files in my project.

NJP.1
Associate III

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

0693W00000WJdt6QAD.png 

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..

0693W00000WJdvgQAD.png 

Thankyou.

3 REPLIES 3
ChahinezC
Lead

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.

S.Ma
Principal

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...

Pavel A.
Evangelist III

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.