Use of the global -I include path

If two libraries refer to each other, what are the include paths?
I tried to separate the adafruit GFX and SDD1306 libraries.
I could not figure out how to let sdd1306 find the gfx files. I had to add them together.

@mpechner, can you please specify how you are compiling? IDE, CLI, local toolchain?

Which library (include link) were you trying to separate? :smile:

1 Like

I am using the IDE.
I took your ssd1306 github repo and formatted it as the example describes a contributions should. Split it into a ssd1306 and gfx repo as adafruit delivers it.

To get it to compile with a project in the IDE, I added the GFX files back into ssd_1306.

But the first attempts:
So split ssd_1306 and gfx. Then I did “include in app” on both.
How do I get ssd_1306 to correctly refer to the gfx library when using the IDE.

In ssd_1306.h and ssd_1306.cpp it had
#include "Adafruit_GFX.h"
then I tried #include “Adafruit_GFX/Adafruit_GFX.h”

Got a compile error saying Adafruit_GFX.h could not be found.

Is there a way to use a local tool chain then load into the sparkcore?

It got frustrated and did the project using a Yun. But would like to try it on the spark core.

@mpechner, I played around a bit and I see your point. The Adafruit library files are actually supposed to be kept together. I think the way the library feature is done right now is they have to be self-standing so they cannot refer to one another. You should add your comments to the library topic:

BTW, I will be publishing my mfGFX library soon which includes support for multiple, user-defined fonts. Given the structure of the Spark libraries, I was looking at including different displays as examples but I am not sure if that will work as intended. So stay tuned :smile:

Ok. So my current version will stay as is.
So, Since what I have is your port of the code, do you have a preferred license? Just add what ever license adafruit had in hers in the sparks.json?

Do you want to merge mine back into your code?

@mpechner, the original license should be preserved. As for merging, if your library is my port, I don’t see the point! I will be publishing a “complete” mfGFX libary so there is no need to port. :smile:

OK. Cool. 11 12 13 14 20