Page 1 of 1
Libraries in sketch folder
Posted: 04 Nov 2017 21:23
by rom1011
I cannot get libraries installed in the local sketch folder to work with the Zuno tool chain. It works all fine with other tool chains.
Let’s say I have a $SKETCHFOLDER/libraries/mylib/mylib.h & mylib.cpp.
I restart the IDE and I can see mylib in the Include Library drop down. But compiling fails with “mylib.h No such file or directory”. The mylib.h is not copied to the tmp build directory.
As soon as I switch to another board it all works fine.
What am I missing?
BTW am using 2.1.1 and Arduino 1.8.5
Thanks!
Roland
Re: Libraries in sketch folder
Posted: 04 Nov 2017 21:36
by petergebruers
I can only confirm what you say. Last week I tried to develop a library (for BMP280 but that is not important) and I get the same error. I did not find a workaround.
Re: Libraries in sketch folder
Posted: 05 Nov 2017 02:09
by PoltoS
We will check this issue to fix in 2.1.2
Re: Libraries in sketch folder
Posted: 05 Nov 2017 11:40
by petergebruers
BTW I think I also cannot run libraries from the "libraries" folder in the sketch directory on my PC (have not tried on a Mac). At the moment, I put the code in C:\Users\peter\AppData\Local\Arduino15\packages\Z-Uno\hardware\zw8051\2.1.1\libraries. (so the first part of that path is %localappdata%).
Re: Libraries in sketch folder
Posted: 07 Nov 2017 15:01
by pjpankhurst
I raised this issue some time back and was told to copy the files in to the appropriate place manually, which I have been doing, and it then works..
Re: Libraries in sketch folder
Posted: 07 Nov 2017 22:15
by rom1011
> I was told to copy the files in to the appropriate place manually,
Hm - what would the appropriate place be? IMHO the $SKETCHFOLDER/libraries is the right place.
Re: Libraries in sketch folder
Posted: 08 Nov 2017 12:17
by pjpankhurst
As an example, I placed the LCD library I generated here:
C:\Users\Paul\AppData\Local\Arduino15\packages\Z-Uno\hardware\zw8051\2.1.1\libraries\ZUNO_LCD_I2C>
Obviously the username will be different to 'Paul' on your system, and Appdata is of course a hidden directory by default
Re: Libraries in sketch folder
Posted: 08 Nov 2017 19:31
by rom1011
Thanks Paul for the reply. I was just confused by the working "right place". This is IMHO not the right place for user provided libraries.
What I did is to keep the libraries in the sketchfolder/libraries but created a symlink ("mklink /D" on Windows) to the ZUno package directory (same directory you are using).