Go Down

Topic: trouble adding a .h file (Read 65 times) previous topic - next topic


When I open the sketch (IDE 1.8.12) I can see the two tabs , one with the source code (the .ino file) that has at the top #include <filename.h> I can also see the other tab called filename.h . When I select the filename.h tab I can see the code. Yet when I try to compile the sketch it won't compile saying "filename.h :No such file or directory".I've tried everything I can think of and gone online searching for an answer---nothing I've tried works.

At this point I'm getting extremely frustrated; can someone suggest an answer?  thank you, Marc


This syntax:
Code: [Select]
#include <filename.h>
causes the include path (e.g., where the libraries are installed) to be searched for the file.

This syntax:
Code: [Select]
#include "filename.h"
causes the local path to be searched, then the include path if the file was not found in the local path.

So if you use the double quote syntax, it will work as expected.

Go Up