I have searched the forum but have not found an answer to my severe problem.
It must be something simple, it seems I am the only one with Library problems?
All my sketches cannot find the library files.
What I have done may have created this problem.
I originally wanted to move the Arduino folder from "My Documents" to off load some space on the "C" drive and move it to one of my larger drives. C: drive is only a 256 G SSD.
My "I:" drive is a 4 TB and has lots of room to store anything and I use it daily.
In the Arduino IDE I clicked on "File" then "Preferences" and browsed to my I:\arduino\sketch directory.
I can load sketches from this directory but the IDE cannot find the "I:\arduino\library" directory even though the library has the library file I need.
It seems the IDE wants to go to a totally different location even though I specified the I: arduino location in the preferences box. Here is the error code I am receiving. WHY does it want to go to my "Program Files" directory ?
C:\Users\wresk\Documents\Arduino\Sketch\DS3231 RTC\ds3231\ds3231.ino:3:20: fatal error: RTClib.h: No such file or directory
#include "RTClib.h"
^
compilation terminated.
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Arduino/Genuino Uno.
If your sketchbook is I:\arduino\ then your libraries folder is I:\arduino\libraries. Note it's "libraries", not "library". But also from this:
DaveWreski:
In the Arduino IDE I clicked on "File" then "Preferences" and browsed to my I:\arduino\sketch
it sounds like you set File > Preferences > Sketchbook location to I:\arduino\sketch. In that case the libraries folder is I:\arduino\sketch\libraries.
DaveWreski:
WHY does it want to go to my "Program Files" directory ?
There are multiple library folders that the Arduino IDE searches for an included file. In the case of your Wire.h include this is inside the Arduino AVR Boards hardware package at C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries. That folder is for architecture specific libraries and is only accessible when you have one of the Arduino AVR Boards selected. If you have the board of a different hardware package selected then its library folder will be in the include search path. There is also a library folder at C:\Program Files (x86)\Arduino\libraries for general libraries bundled with the Arduino IDE. You should never install libraries to either of these locations because they would be lost when you updated to a new version. Always install libraries to the libraries subfolder of your sketchbook folder.
Thank you for your quick reply.
I am sorry for the typo in my post. Yes, it is "Libraries" but I have a question you pointed out.
I changed the drive from "I:" to "D:" to prevent Windows from changing the drive letter, it has in the past from "I:" to "J:" ?? Somhow a USB drive showed up as "I:"
Is the correct directory structure for drive "D:" ?
D:\arduino\sketch\libraries
Or is this correct?
D:\arduino
D:\arduino\sketch
D:\arduino\libraries
What I am trying to say "Is libraries a subdirectory of "sketch"" or is Libraries a subdirectory of "arduino"?
I have it set as a subdirectory of "D:\arduino"
Anyway, it does not work yet. Still trying.
Dave
More later..
Hello Karma:,
Your answer is great. I did not know about the other directories that you pointed out not to use.
Good advice.
Here is where I have gotten, not very far into my problem.
(x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "C:\Users\wresk\AppData\Local\Temp\arduino_build_228433\sketch\HelloWorld.ino.cpp" -o "C:\Users\wresk\AppData\Local\Temp\arduino_build_228433\preproc\ctags_target_for_gcc_minus_e.cpp"
D:\Arduino\Sketch\Adafruit-RGB-LCD-Shield-Library-master\examples\HelloWorld\HelloWorld.ino:14:35: fatal error: Adafruit_RGBLCDShield.h: No such file or directory
#include <Adafruit_RGBLCDShield.h>
^
compilation terminated.
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
Error compiling for board Arduino/Genuino Uno.
I hope the attachments are readable and helpful.
I cannot tell you how many hours I have spent on this problem.
Thank you for all your help, I know it takes your time.
Dave
Hello All,
The previous directory listing was not very clear so I cleaned up a bunch of junk.
This listing is the most recent and should show how the files are located on my D: drive.
Thanks for the help.
Dave
The libraries folder must be a subfolder of the sketchbook.
The library folder must be in the libraries folder.
You still haven't told me whether you have File > Properties > Sketchbook location set to D:\Arduino or to D:\Arduino\Sketch.
You have D:\Arduino\Sketch\Adafruit-RGB-LCD-Shield-Library-master, which is in the wrong location but also D:\Arduino\Libraries\Adafruit_RGBKCDShield, which seems odd that the folder name is spelled wrong but that won't cause the error you're getting.
Hello Pert,
Wow , Success thanks to this forum and you Pert !
Your tips were right on the mark. One of them, I feel stupid, was checking "Sketch - Show sketch Folder". And that lead me to check anywhere else on my computer for hanging references to Arduino - Sketch and Libraries. Removing any bogus locations kept Arduino IDE from looking into a black hole.
Another tip you told me about was: "You should never install libraries to either of these locations because they would be lost when you updated to a new version. Always install libraries to the libraries subfolder of your sketchbook folder."
That alone saved me tons of time and aggravation. I now know those location should be there and to leave them alone.
Your "Easy Fix" was indeed an easy fix for my problem !
I now have my RGB LCD Shield working just fine. Now I can get back to before when all these problems started ! I have a great project to customize, Overview | RGB LCD Shield | Adafruit Learning System, the way I need it for the next major project.