Libraries in sketch folder

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

Libraries in sketch folder

Post by rom1011 » 04 Nov 2017 21:23

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: 161
Joined: 26 Jul 2015 17:29

Re: Libraries in sketch folder

Post by petergebruers » 04 Nov 2017 21:36

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: 3817
Joined: 26 Jan 2011 19:36

Re: Libraries in sketch folder

Post by PoltoS » 05 Nov 2017 02:09

We will check this issue to fix in 2.1.2

petergebruers
Posts: 161
Joined: 26 Jul 2015 17:29

Re: Libraries in sketch folder

Post by petergebruers » 05 Nov 2017 11:40

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: 28
Joined: 07 Sep 2017 00:40

Re: Libraries in sketch folder

Post by pjpankhurst » 07 Nov 2017 15:01

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: 5
Joined: 24 Sep 2017 22:57

Re: Libraries in sketch folder

Post by rom1011 » 07 Nov 2017 22:15

> 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: 28
Joined: 07 Sep 2017 00:40

Re: Libraries in sketch folder

Post by pjpankhurst » 08 Nov 2017 12:17

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: 5
Joined: 24 Sep 2017 22:57

Re: Libraries in sketch folder

Post by rom1011 » 08 Nov 2017 19:31

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

Who is online

Users browsing this forum: No registered users and 5 guests