Libraries in sketch folder

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
rom1011
Posts: 6
Joined: 24 Sep 2017 22:57

Libraries in sketch folder

Post 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
petergebruers
Posts: 255
Joined: 26 Jul 2015 17:29

Re: Libraries in sketch folder

Post 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.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Libraries in sketch folder

Post by PoltoS »

We will check this issue to fix in 2.1.2
petergebruers
Posts: 255
Joined: 26 Jul 2015 17:29

Re: Libraries in sketch folder

Post 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%).
pjpankhurst
Posts: 31
Joined: 07 Sep 2017 00:40

Re: Libraries in sketch folder

Post 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..
rom1011
Posts: 6
Joined: 24 Sep 2017 22:57

Re: Libraries in sketch folder

Post 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.
pjpankhurst
Posts: 31
Joined: 07 Sep 2017 00:40

Re: Libraries in sketch folder

Post 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
rom1011
Posts: 6
Joined: 24 Sep 2017 22:57

Re: Libraries in sketch folder

Post 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).
Post Reply