[SOLVED] How to use libraries (EEPROM.h) with Sloeber

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
Post Reply
vitor_boss
Posts: 61
Joined: Wed Apr 19, 2017 9:50 am

[SOLVED] How to use libraries (EEPROM.h) with Sloeber

Post by vitor_boss » Fri Aug 18, 2017 8:14 pm

Well, after 4 hours of searching, installing, and struggling with Sloeber I have to ask:

How enable device library folders, I'm trying to compile a EEPROM example and always get #include <EEPROM.h> error.

How fix that?
Last edited by vitor_boss on Fri Aug 18, 2017 10:13 pm, edited 1 time in total.

User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to use libraries (EEPROM.h) with Sloeber

Post by Pito » Fri Aug 18, 2017 8:29 pm

Try

Code: Select all

#include "EEPROM.h"
In Sloeber the library folder must be named "EEPROM".
Place the library folder into the ../libraries/ folder of your "platform/core" you downloaded (and you want to use).
Core and Libraries.JPG
Core and Libraries.JPG (16.04 KiB) Viewed 348 times
.

Sloeber parses the #includes in your source(s) and adds the libraries into your project automatically.

The libs (identified via your #includes in your sources) then appear in your Project Explorer (in Sloeber):
Sloeber Libs.JPG
Sloeber Libs.JPG (14.38 KiB) Viewed 353 times
Last edited by Pito on Fri Aug 18, 2017 9:08 pm, edited 1 time in total.
Pukao Hats Cleaning Services Ltd.

vitor_boss
Posts: 61
Joined: Wed Apr 19, 2017 9:50 am

Re: How to use libraries (EEPROM.h) with Sloeber

Post by vitor_boss » Fri Aug 18, 2017 9:06 pm

All my used libraries should go to that folder?

Now I'm getting this:

Code: Select all

D:\sloeber\arduinoPlugin\libraries\SPIFlash\2.7.0\src\SPIFlash.h:60:19: fatal error: SPI.h: No such file or directory
   #include <SPI.h>

User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to use libraries (EEPROM.h) with Sloeber

Post by Pito » Fri Aug 18, 2017 9:12 pm

I do place all my libraries used into that folder above (marked red)..

I have got several versions of all existing cores in my Sloeber, each core version has its own /libraries/ folder (marked red above) with my libraries which work fine with that particular core version :)
Cores used in Sloeber.JPG
Cores used in Sloeber.JPG (25.73 KiB) Viewed 336 times
It could be you can place the libs into the sloeber's
..\sloeber\arduinoPlugin\libraries\
but I do not do it..

Try use " " instead of < > in your #includes..

What is important with Sloeber: the header file you use in the #include "MyLibEEproM.h" must be found in folder named ../libraries/MyLibEEproM/
Last edited by Pito on Fri Aug 18, 2017 9:35 pm, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

vitor_boss
Posts: 61
Joined: Wed Apr 19, 2017 9:50 am

Re: How to use libraries (EEPROM.h) with Sloeber

Post by vitor_boss » Fri Aug 18, 2017 9:27 pm

I have wrote library path on Includes section, after indexing project again it worked

Project Settings->C/C++ General->Paths and Symbols->Include->Add....
Thank you for the help

User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: How to use libraries (EEPROM.h) with Sloeber

Post by Pito » Fri Aug 18, 2017 9:36 pm

That is done by Sloeber automatically.
Pukao Hats Cleaning Services Ltd.

User avatar
Rick Kimball
Posts: 1054
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: How to use libraries (EEPROM.h) with Sloeber

Post by Rick Kimball » Fri Aug 18, 2017 10:00 pm

@vitor_boss please marked this thread topic as "[SOLVED]"
-rick

danieleff
Posts: 336
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: How to use libraries (EEPROM.h) with Sloeber

Post by danieleff » Sat Aug 19, 2017 3:43 am

vitor_boss wrote:
Fri Aug 18, 2017 9:27 pm
I have wrote library path on Includes section, after indexing project again it worked

Project Settings->C/C++ General->Paths and Symbols->Include->Add....
Thank you for the help
By the way there is an "Arduino/Add library to selected project" menu option.

vitor_boss
Posts: 61
Joined: Wed Apr 19, 2017 9:50 am

Re: How to use libraries (EEPROM.h) with Sloeber

Post by vitor_boss » Sat Aug 19, 2017 3:58 am

danieleff wrote:
Sat Aug 19, 2017 3:43 am
vitor_boss wrote:
Fri Aug 18, 2017 9:27 pm
I have wrote library path on Includes section, after indexing project again it worked

Project Settings->C/C++ General->Paths and Symbols->Include->Add....
Thank you for the help
By the way there is an "Arduino/Add library to selected project" menu option.
The problem was with library defaults like SPI

Post Reply