Fatal error: no such file or directory. (But the path was set correctly)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fatal error: no such file or directory. (But the path was set correctly)

301 Views
MVR
Contributor III

Hello everyone,

I'm facing a weird error, I have some header files that the compiler returns "Fatal error: <NAME> no such file or directory".

I set the correct path to the Path and Symbols, I'm using the correct configuration (Debug_RAM), I even added a line: #error "it is reaching here", and when I compile, I can see this error, instead the fatal error about no such file or directory.

So in my understanding, the compiler can find this file, but I don't know what reason it is happening. 

When I added the path explicit to the include, it works. For example: #include "../../../name_file.h". I can fix the problem with this solution, but I would like to understand why without the explicit path it is not working, once the path was correct added to the path and symbols option.

I also did a test, I put this file with error in another path that was some header files compiling with success, and continue the same error. 

I'm aware with this question about icon under the file: https://mcuoneclipse.com/2012/07/30/icon-and-label-decorators-in-eclipse/ and this would be not the problem, the files are being added to be compiled.

I'm using the new S32DS 3.5 with S32K344 microcontroller. Do you guys have any idea about some test or have you already faced some problem like this?

Thanks,

MVR

Labels (1)
Tags (2)
0 Kudos
3 Replies

277 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

if you click on Includes in your project - have all include path black color or someone has gray color (this mean, that the path is not visible for S32DS). 

jiri_kral_0-1712738631445.png

 

 

Your issue typically occurs if the include path contains non-standard characters like space. Make sure that the absolute path from C:\ all the way to your include doesn't contain any special character. 

0 Kudos

254 Views
MVR
Contributor III

Hello @jiri_kral ,

Thank you for the answer.

Here you can see the include about the error:

MVR_0-1712769687170.png

 

You can see that it is not gray, so it was correctly set, right?

It only work if I leave the entire path into include:

#include "../../../../Tresos/MCAL/Can_43_FLEXCAN_TS_T40D34M40I0R0/include/Can_43_FLEXCAN.h"

If I leave:

#include "Can_43_FLEXCAN.h"

It doesn't work... 

Thanks,

MVR

0 Kudos

158 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

from screenshot the Can_43_FLEXCAN.h should be located inside your project - in particular - 

"${ProjDirPath}/FlexBMS_Comasso/Integration/src/BSW/Tresos/MCAL/Can_43_FLEXCAN_TS_T40D34M40I0R0/include" (you can check the path in Project Properties). 

If you need to use 4 times ../ the ProjDirPath probably points to different location or the header file is located outside of the Project/Workspace. Did you imported the project into workspace properly (File -> Import -> General -> Existing Project into Workspace) ?

 

0 Kudos