Go Down

Topic: Where are libraries located? (Read 156 times) previous topic - next topic

Terrypin

Oct 14, 2020, 12:29 pm Last Edit: Oct 14, 2020, 12:30 pm by Terrypin
Q1: Why are newly installed libraries not placed in
C:\Program Files (x86)\Arduino\libraries ?

Q2: I suspect it's because at an earlier stage of my ignorance I've specified an alternative. If so, where is that please, as I cannot find it in File > Preferences or Preferences.txt ?

Q3. At the risk of repeating ground covered in an earlier thread, I still don't see why that folder got called arduino_208885 instead of something meaningful like SmartEverything

Code: [Select]

// I'm learning more about libraries
// So I installed a new one (which I might use some day), SmartEverything LPS25H, using Manage Libraries
// to learn where its files were placed
// They are in
// C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries\arduino_208885
// and the 'key' file is
// C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries\arduino_208885\src\LPS25H.h
// So this sketch was a test to see if it compiles. It does, which is good, but puzzling.
// How does the compiler know to search in that folder, as well as the main library in
// C:\Program Files (x86)\Arduino\libraries ?

#include <LPS25H.h>

void setup()
{
  // In case something is needed here

  Serial.begin(115200);
  Serial.println("Test");
}

void loop()
{

}


Terry

sevenoutpinball

This question comes up a lot.    And you get lots of different answers.  Obviosly the main documentation needs improvement.  See if you have an arduino15 folder
The smartest person can make the dumbest mistake.

groundFungus

#2
Oct 15, 2020, 05:16 am Last Edit: Oct 15, 2020, 05:17 am by groundFungus
All user installed libraries should be in a folder named libraries  in the sketchbook folder.  Other libraries that are installed with the IDE and installed cores are installed elsewhere.  It is best to use the library manager to install libraries.  That ensures that the latest versions are installed in the right place.
You will save everyone's time if you read and follow the forum guidelines.  :)          
https://forum.arduino.cc/index.php/topic,148850.0.html
and
https://forum.arduino.cc/index.php?topic=97455.0

Terrypin

This question comes up a lot.    And you get lots of different answers.  Obviosly the main documentation needs improvement.  See if you have an arduino15 folder

Thanks, but do you mean that there are no agreed answers to my three questions?

Yes I do have that folder, C:\Users\terry\AppData\Local\Arduino15. But what is the implication of that please?

Terrypin

All user installed libraries should be in a folder named libraries  in the sketchbook folder.  Other libraries that are installed with the IDE and installed cores are installed elsewhere.  It is best to use the library manager to install libraries.  That ensures that the latest versions are installed in the right place.
Thanks but, as I implied, I know they should be. I'm asking why they are not.
As I also said, I did use the library manager.

Terrypin

Anyone with any thoughts on any of my three questions please?

westfw

Quote
Why are newly installed libraries not placed in
C:\Program Files (x86)\Arduino\libraries ?
Libraries are normally installed in the "libraries" subdirectory of your "sketchbook" folder.
Do you by any chance have your sketchbook set to a different location (it's a "preference"), or are you using a "portable" install?  The whole directory prefix in your example is "unusual":
Code: [Select]
C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\


Terrypin

Thanks @westfw. I deliberately chose that Dropbox location for my sketchbook, mainly because I can access it (for viewing and downloading new sketches) on my iPhone and iPad as well as my Win 10 PC.

I now see that specifying the Sketchbook location also defines the \libraries location as a subfolder. So should I move (or copy) all other libraries into that folder? Such as those originally installed in C:\Program Files (x86)\Arduino\libraries? And also Q2 of my post, namely why the installation of SmartEverything LPS25H gets called arduino_208885?



westfw


Quote
should I move (or copy) all other libraries into that folder? Such as those originally installed in C:\Program Files (x86)\Arduino\libraries?
No, because those are "core libraries"  If you have any libraries in your Documents\Arduino\libraries directory (from before you moved the sketchbook), you should probably copy them (or just install new versions.)




Quote
And also Q2 of my post, namely why the installation of SmartEverything LPS25H gets called arduino_208885?
I don't have any theories on that :-(  When I tried installing it here, I got a normal:
Code: [Select]
 /Applications/Arduino-1.8.13.app/Contents/Java/portable/sketchbook/libraries/SmartEverything_LPS25H/

Go Up