Arduino: why does simple include not work

Hello in my arduino code i simple want to include another file like this:

#include "letters.h"


but it says

 error: letters.h: No such file or directory


the letters.h is definitely there, right next to the ino file from which i compile.

You don't need to include, just call functions from another file. It handles for you.

• yep, but only if the other files also ends with .ino Feb 26 '12 at 12:34
• Arduino says that the programming language of platform is "Arduino Programming Language", not C or C++ (they gotta be kidding =) ). But it parses your .pde (or .ino) files to a .cpp file under temp folder of your OS. .h files may not be added. One possible way can be moving your header files to "ardunio include directory" and using angle brackets instead. But changing the file extension might be easier.
– Onur
Feb 26 '12 at 12:59

Sketch -> Import Library -> Add Library

Try #include <letters.h> with < and > instead of double quotes.
The C++ standard says #include "header" searches the header in the same folder as the .cpp and then in the include paths, while #include <header> only searches the include paths. But the Arduino "language" is not 100% C standards compliant.
If it still doesn't work, it would mean you don't have letters.h in your libraries folder. Either add it there or copy it to your sketch folder (together with all other source files in that library), restart (all instances of) the Arduino IDE and #include "letters.h" (with the double quotes) so it is included from your sketch folder.