Just installed Arduino 2.0.3 and I attempted to build a sketch which includes a library that I manually installed in version 1.8.19 and it can't be found:
In my program I have
#include <DS3231.h>
Now, attempting to compile it cannot find the library.
What is the path to the basic libraries in Arduino 2.0.3?
1 Answer 1
I found the location by examining the app while it was running.
The associated libraries are at:
%localappdata%\arduino15\Libraries
That will look like : C:\Users\<username>\AppData\Local\Arduino15\libraries
I created a new folder named DS3231
dropped in the .cpp, .h and .config files and now my sketch compiles with the #include <DS3231.h>
Kind of blows my mind that the Arduino 2.0.3 Libraries are found in a directory named Arduino15. Is that an old version or something?
Here's what I see in preferences -- don't see a location for user libraries:
The best location will be your sketchbook location + a folder named libraries
.
For example, in my case my sketchbook location is :
c:\users\<username>\dev\arduino
so my library folder should be:
c:\users\<username>\dev\arduino\libraries
-
1"in a directory named Arduino15. Is that an old version or something?" The
15
comes from the the 1.5.x series IDE which first introduced support for boards other than the original set of AVR boards, was carried into arduino-builder, and arduino-cli were it remains relevant to current day IDEs. It is not a normal place to add user libraries.timemage– timemage2023年01月09日 03:49:40 +00:00Commented Jan 9, 2023 at 3:49 -
@timemage Where would the place be to add user libraries? I've added an image to the answer showing the Arduino 2.0.3 preferences but I don't see any location that would work. Do you have an alternative path in mind that works for 2.0.3? Thanksraddevus– raddevus2023年01月12日 14:58:26 +00:00Commented Jan 12, 2023 at 14:58
-
2do you see the location of the sketchbook folder in the Preferences dialog? then read my comment again and slow2023年01月12日 16:27:41 +00:00Commented Jan 12, 2023 at 16:27
libraries
folder in the sketchbook folder. the location of the sketchbook folder is in the Preferences dialog in the IDE