No such file or directory

Hello , I have a problem with the libraries and verifying my code with Arduino IDE, if someone could please explain how to solve this error.

C:\Users\minwe\OneDrive\Attachments\מסמכים\Arduino\sketch_may4a\sketch_may4a.ino:1:10: fatal error: Adafruit_GFX.h: No such file or directory
compilation terminated.
exit status 1

Compilation error: Adafruit_GFX.h: No such file or directory

is it because non-english terms are mixed?, this was a bought laptop and when they configured it the names were stuck and I could not change them

Did you installed the Adafruit_GFX library?

Yes, and I put the sketch into the same folder which contains libraries which in turn contain the Adafruit_GFX library

Where you put the sketch - to the folder which contains a libraries folder or to libraries folder itself? The first is correct, but the second is not.

The first one

In this case, it's probably really a path problem. Or even two problems: the non-latin characters in folder names and a OneDrive as a base folder.
Try to create a new user which named in Latin chars only.

C:\Users\minwe\AppData\Local\Temp.arduinoIDE-unsaved202444-12236-iif0k3.cx3k\sketch_may4a\sketch_may4a.ino:1:10: fatal error: Adafruit_GFX.h: No such file or directory
#include <Adafruit_GFX.h>
^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: Adafruit_GFX.h: No such file or directory

I tried creating it on the PC local itself and removed the foreign characters, but this still shows up

It seems that you installed the library incorrectly.
Try to remove the Adafruit_GFX folder and install it again, using a Library Manager

Yep, it was as you said location problem, the arduino always installed the libraries in a file with non-latin character name, I had to move it manually to fixt it

Thank you very much for your help

Is the problem solved?

Where did the Library Manager install the library and where did you move it to ?

Yes, thank you for your help🌹

The library manager installed it in a folder in wgich path name contained non english characters, I moved to from the one drive to a local seperare folder

I suggest that you change the location of your sketchbook folder to prevent that happening again

Did you change the default folder where libraries are installed? How did you do it?

Hi @dabide_bidubi. You can't change the library installation location directly, but you can do it indirectly. Arduino IDE always installs libraries under the libraries subfolder of the sketchbook folder. The sketchbook folder location is configurable, so if you change the sketchbook location, you also change the library installation location.

I'll provide instructions you can follow to do that:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Take note of the path that is shown in the "Sketchbook location" field. of the "Preferences" dialog.
  3. Click the "BROWSE" button on the right side of the "Sketchbook location" field.
    The "Select a new sketchbook location" dialog will open.
  4. Select a folder in any location that contains only basic ASCII characters (the characters A-z, 0-9, _, -, . are safe).
    :warning: Make sure to pick a location that will be safe to store your files since, in addition to containing installed libraries, the sketchbook is a convenient location to save your sketches.
  5. Click the "Choose" button in the "Select a new sketchbook location" dialog.
  6. Click the "OK" button in the "Preferences" dialog.
  7. Move all the files from the folder at the path of the old sketchbook location (which you noted t step (2) of these instructions) to the folder at the path of the new sketchbook location you set in the Arduino IDE preferences.
1 Like

code is working now, much appreciated @ptillisch

You are welcome. I'm glad it is working now.

Regards,
Per

1 Like

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