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.
-
How about placing all libraries at a network share and then mount this share on each linux machine to the libraries folder?– chrislOct 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.– GilOct 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– chrislOct 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?– GilOct 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– chrislOct 17, 2022 at 7:22
1 Answer
Arduino IDE can use libraries only from 3 locations.
- libraries folder in sketchbook folder
- libraries folder of selected board's platform
- 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.
-
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 ♦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:-)– GilOct 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 ♦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.– GilOct 19, 2022 at 16:17
-
1