Fatal error : no such file or directory

Hello,
I know this was discussed many times here but could not find a fix for my issue.

In order to keep the released projects with their own libraries version, I decided that is better for projects to have a folder called "Libs" in the sketch folder. So inside Libs folder I have folders with libraries that I use for that specific project release.

In my code I added below call.

#include "Libs/STM32HMI/STM32HMI.h"

The above code works, but inside "STM32HMI.h" I also include libraries ...

#include "Libs/LiquidCrystal_I2C/LiquidCrystal_I2C.h"
#include "Libs/STM32Encoder/STM32Encoder.h"

These ones do not work. The error pops out for the first declared (e.g. LiquidCrystal.h). I tried many ways and looked in forums and posts but still could not figure it out.

Could you please help explain how is the correct call?

Thanks,

Try a few things;

Instead of putting the other includes within STM32HMI.h put those includes in the same place as the one that worked, so that you have all three together. Does that work?

Going back to the code that failed try using the full path to the .h files. Does that work?

The path is relative to the file. So it needs to be done like this:

#include "../LiquidCrystal_I2C/LiquidCrystal_I2C.h"

dacair:
I decided that is better for projects to have a folder called “Libs” in the sketch folder. So inside Libs folder I have folders with libraries that I use for that specific project release.

Use a folder named “src” instead of “Libs”. The “src” subfolder of the sketch folder has the special property of being recursively compiled by the Arduino IDE. The source files under a subfolder named “Libs” won’t be compiled by the Arduino IDE.