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
sonofcy
September 23, 2024, 11:11am
5
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?
sonofcy
September 23, 2024, 11:17am
7
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
sonofcy
September 23, 2024, 12:15pm
10
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:
opened 07:00PM - 26 Dec 19 UTC
topic: code
type: imperfection
### Describe the problem
If a library is installed under a path that contains… Cyrillic characters, Arduino CLI is unable to discover it.
Compilation of sketches with an `#include` directive for a header file of a valid library fails with a "`No such file or directory`" error.
### To reproduce
```text
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 4b70e023 Date: 2023-01-31T03:19:27Z
$ export ARDUINO_DIRECTORIES_USER="/tmp/arduino-cli-directories/мікроконтролер"
$ arduino-cli lib install Arduino_JSON
[...]
$ mkdir /tmp/FooSketch
$ printf "#include <Arduino_JSON.h>\nvoid setup() {}\nvoid loop() {}" > /tmp/FooSketch/FooSketch.ino
$ arduino-cli compile --fqbn arduino:avr:uno /tmp/FooSketch/FooSketch.ino
C:\Users\per\AppData\Local\Temp\FooSketch\FooSketch.ino:1:10: fatal error: Arduino_JSON.h: No such file or directory
#include <Arduino_JSON.h>
^~~~~~~~~~~~~~~~
compilation terminated.
Used library Version Path
Arduino_JSON 0.2.0 C:\Users\per\AppData\Local\Temp\arduino-cli-directories\мікроконтролер\libraries\Arduino_JSON
Used platform Version Path
arduino:avr 1.8.6 C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Error during build: exit status 1
```
### Expected behavior
Any path supported by the file system is also supported by the library discovery system
### Arduino CLI version
#### Original report
Arduino IDE 1.8.10
#### Last verified with
4b70e023
### Operating system
Windows
### Operating system version
- 10
- 11
### Additional context
The issue is not specific to Cyrillic. For example, it also occurs with a folder named `文` or `Κώστας`.
---
The fault only occurs on Windows. I am not able to reproduce it on Ubuntu 22.04 or macOS Ventura machines.
---
After changing system's locale from English to Bulgarian (win1251) + restart, the compilation succeeded. Unfortunately this is not viable solution, because we have many computers (>150) and changing system locale requires admin privileges.
My suggestion is that the IDE is not using the unicode version of the API when searching for libraries?
---
This is more likely to occur for those using [Microsoft **Onedrive**](https://en.wikipedia.org/wiki/OneDrive) because the default location of the sketchbook is:
```text
C:\Users\<username>\OneDrive\<localized "Documents">\Arduino
```
The `<localized "Documents">` in the path above is a placeholder the word "Documents" localized for the user's locale (e.g., `文档` or `Документы`)
#### Additional reports
- https://forum.arduino.cc/t/wemos-d1-mini-upload-problem/1084371
- https://forum.arduino.cc/t/no-such-file-or-directory-but-i-already-had-this-file/961118
- https://forum.arduino.cc/t/fatal-error-adafruit-neopixel-h-no-such-file-or-directory-but-i-have-it/1070069/15
- https://forum.arduino.cc/t/library-gives-error/1089633
- https://forum.arduino.cc/t/except-for-the-available-libraries-i-cant-use-other-libraries-even-though-i-have-downloaded-them/1092556
- https://forum.arduino.cc/t/compilation-error-due-to-library-hpp-file-not-being-detected/1127096
- https://forum.arduino.cc/t/which-arduino-nano-clone-i-have/1192347/11
- https://forum.arduino.cc/t/cannot-verify-the-arduino-code-because-the-installed-library-cannot-be-found/1215989
- https://forum.arduino.cc/t/10-fatal-error-onewire-h-no-such-file-or-directory/1223739
- https://forum.arduino.cc/t/unknown-error-for-arduino-1-8-19/1234260
- https://forum.arduino.cc/t/compilation-of-keypad-library-example-fails-key-h-no-such-file-or-directory/1241109
- https://forum.arduino.cc/t/mg135-library-please-answer/1254438
- https://forum.arduino.cc/t/i-keep-getting-library-compilation-error-despite-having-the-library/1255423
- https://forum.arduino.cc/t/no-such-file-or-directory/1255862/1
- https://forum.arduino.cc/t/no-such-file-or-directory/1255862/18
- https://forum.arduino.cc/t/arduino-ide-2-3-2-do-not-read-any-installed-library/1256849
- https://forum.arduino.cc/t/have-library-error-eventhough-installed/1258722
- https://forum.arduino.cc/t/arduino-ide-cannot-find-time-library-even-though-it-exists/1261462
- https://forum.arduino.cc/t/adafruit-bmp280-h-no-such-file-or-directory/1265651
- https://forum.arduino.cc/t/compilation-error-adafruit-mpu6050-h-no-such-file-or-directory/1279099
- https://forum.arduino.cc/t/pcm-h-no-such-file-or-directory/1282193
- https://forum.arduino.cc/t/no-such-file-directory-even-though-i-have-already-installed-the-related-library/1300806
- https://forum.arduino.cc/t/no-such-library-error-please-help/1302038
- https://forum.arduino.cc/t/fatal-error-no-such-file-or-directory/1304273
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-cli/issues?q=)
- [X] I verified the problem still occurs when using the [nightly build](https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds)
- [X] My report contains all necessary details
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
system
Closed
March 22, 2025, 12:44pm
12
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.