Fatal error: No such file or directory

Hello,
I have this error on compilation. The library is in the same folder with the project.

personal library arduino ide created in edge impulse
C:\sketchtest_car_sep23a\sketchtest_car_sep23a.ino:1:10: fatal error: car1_inferencing.h: No such file or directory
1 | #include <car1_inferencing.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Welcome to the forum

As your topic does not relate directly to the installation or operation of the IDE it has been moved to the Programming Questions category of the forum

1 Like
#include <car1_inferencing.h>

This style of #include expects to find the library file in one of the standard library locations. If the library file is in the same folder as the sketch file then use this style instead

#include "car1_inferencing.h"

The compiler will then look for the file in the sketch folder before looking elsewhere

1 Like

already tried that and it did not work

Your folder organization is weird. Where is your library folder that gets created at install? Maybe if you followed the usual rules it would work.

1 Like

Absolute Path #include "C:/Users/torna/OneDrive/Έγγραφα/Arduino/libraries/car1_inferencing.h"
is OneDrive creating the problem?

Maybe, but the cyrillic is for sure if my memory serves.
I use onedrive but I have all the /root/Arduino set to 'Always Keep on this device'

1 Like

It maybe OneDrive or it maybe the extended ASCII characters in the path to the Libraries folder

Either way the library file is not

unless you have got the sketch in a very unusual place, ie the libraries folder of the sketchbook

1 Like

this fixes the problem moved the Arduino folder to C:\Arduino

  • Open Arduino IDE.
  • Go to File > Preferences.
  • Under Sketchbook location, change the path to a local directory, such as C:\Arduino, that doesn’t sync with OneDrive or contain special characters.
1 Like

It looks like his library and sketch folders are far apart and unrelated, BUT I know from experience OneDrive can make things look weird if you do not practice good habits.

1 Like

Hi @usernamear1s. The Arduino developers are tracking the bug of non-ASCII characters in the library's path causing a spurious "No such file or directory" error here:

As you already discovered, the workaround for the bug is to use a sketchbook location that doesn't contain any non-ASCII characters.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.