0

I want to place all of my libraries on the server. Currently the sketches work fine and as far as I know the libraries are coming from the individual linux mint machines using cinnamon, releases vary depending on machine. I can move the libraries etc but what do I do to the IDE 1.8.18 and 1.8.19? to make it follow that path.

5
  • How about placing all libraries at a network share and then mount this share on each linux machine to the libraries folder?
    – chrisl
    Commented Oct 15, 2022 at 23:37
  • The server is already mounted as far as I know. In the GUI I select the server then the appropriate folder. It shows as "network:///" I then pick the server20 and get this "smb://server20.local/" then I pick my target folder "smb://server20.local/documents/" at this point any of the subfolders open and files are accessible such as opening a sketch etc and they will compile without a problem. I have used Linux for many years and appreciate its power but I definitely do not fully understand it.
    – Gil
    Commented Oct 15, 2022 at 23:48
  • If you type the command "mount" into a command line terminal it will list all mounted directories. But to mount a network share at a specific directory you most likely will have to learn how to mount them. There are many tutorials on the mount command and the fstab file for permanent mounts
    – chrisl
    Commented Oct 16, 2022 at 0:57
  • How does that allow the IDE to access libraries on the server or other drives? From what I understand I have to change the default path in the IDE. If this is correct how?
    – Gil
    Commented Oct 16, 2022 at 20:33
  • It would allow to access the files, because with a mount the OS will make the files reachable inside the normal directory structure. With a mount you can choose the directory, where the network files should be visible. That is called a mount point. I currently cannot test, if using an smb:// URL in the preferences for the sketchbook location would work. So please test that first. When you have confirmed that this doesn't work (what I would guess so), then I will write an answer describing the mount solution
    – chrisl
    Commented Oct 17, 2022 at 7:22

1 Answer 1

1

Arduino IDE can use libraries only from 3 locations.

  1. libraries folder in sketchbook folder
  2. libraries folder of selected board's platform
  3. libraries folder in IDE installation folder (only IDE 1, not IDE 2)

There is no option to configure other paths and absolute or relative paths don't work in #include directive with the Arduino build process.

The only way to use libraries from a different location is to link with means of the operating system the folder with the library into one of the searched locations.

9
  • and question about how to link local or remote folders is off-topic on Arduino SE. you can ask it on other Stack Exchange sites. askubuntu.com, unix.stackexchange.com, superuser.com
    – Juraj
    Commented Oct 18, 2022 at 12:44
  • Thanks, that is all I have been able to do. It does work with "libraries" in the sketch folder but I did not know I could add a libraries folder in the sketch folder, that is a great help. A real big thanks:-)
    – Gil
    Commented Oct 18, 2022 at 21:20
  • 1
    @Gil I am sure there is a libraries folder in your sketchbook folder. Arduino IDE installs libraries there too. libraries folder in the sketch folder will not work.
    – Juraj
    Commented Oct 19, 2022 at 6:07
  • You are correct there is and many times I do not want to use them. There are no libraries in my other "sketchbook" folders (I have several with different names) other then the one the IDE created. I like to put the 'hardware' libraries in the actual sketch folder such as "LiquidCrystal_I2C.h" ,as many times older program files will not compile because of library changes that have occured. Many of the sketches are on the server and compile just fine from several different machines with the library in the same folder as the .ino file.
    – Gil
    Commented Oct 19, 2022 at 16:17
  • 1
    @Gil home.h can be a library too
    – Juraj
    Commented Oct 19, 2022 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.