Hi there.
I have a problem with libraries, and can't get it run.
I want to make a library, which contains a lot of functions AND should include other libraries.
But i completly get confused, where the compiler searches for the files.
I looked into some standardlibrarycode.... and it seems, that they don't do it different...
To keep it simple, i broke everything down:
Library, named inci.h: like this it does not find EEPROM.h
#include <EEPROM.h>
Of couse it works, if i put everything in one file....
I keep the inci.h in the same folder as the mainprogram. But putting it in the arduino's libraryfolder does change anything. (and by changing the "inci.h" to a <inci.h>)
So, how do i specify the path, where he should search for includes?
OK, i get, that the IDE-preprocessor just includes what's directly in my pde.
But in the libraries are often "#includes". Mainly the "linking" between .cpp and the .h
But sometimes others too: the ethernet.h library includes "server" and "client".
Maybe somebody can somebody point out the difference between this and my try!
And: would it be possible, to put the complete content of "EEPROM.h"
(and others i need) in my library? (corrected and with the corresponding .cpps)
But in the libraries are often "#includes". Mainly the "linking" between .cpp and the .h
But sometimes others too:
e.g. the ethernet.h library includes "server" and "client".
These libraries include files which are either in the same directory or in a subdir named "utility" (the name is mandatory).
But in your own library it would not be possible to include for instance the ethernet-lib (or individual files from this directory).
That's the limitation explained in the links.
OK, i get, that the IDE-preprocessor just includes what's directly in my pde.
Its the same for libraries (with the exception of the files in the "utility" subdir).
This works? confirmed at least, if my lib is in the lib-folder
#include "..\EEPROM\EEPROM.h"
Strange, i tried several versions of it, while guessing from where i have to go up directories.... not knowing the reference point. Maybe i missed that one.
Just as a writeup for others facing my problem:
It just works too, when i put the libraryfiles i want to include with my library in the directory of the library i create. (Just tried it out with EEPROM.h until now)
Not a elegant solution, but more elegant than having 5 Libraries to be includes before it's allowed to include my library.