#include question

What is the difference between:

#include "filename.h"

and

#include <filename.h>

I know I’ve seen that there is a difference. And I’ve seen bits and pieces of what that might be from other threads or where I’ve seen that one works and the other doesn’t. But I still can’t put together what the fundamental difference is between the two.

The <filename.h> version looks in a “system” path. The “filename.h” version looks in the current directory.

It would be more appropriate to use <filename.h> for libraries, and “filename.h” for an include file in your current sketch (a separate tab in the IDE).

Thanks Nick!

If it doesn't find the file in the first spot it looks then what? I ask because I know I've seen things compile with IDE-included libraries done both ways. So I'm assuming both of them end up checking the library folder in the installation folder at some point. Is that correct?

Is there a place to set a different or additional folder for it to look in?

Bearing in mind that the files are copied to a temporary directory anyway for compilation, the #include directive probably won't work exactly as it would for a normal C++ installation.

Is there a place to set a different or additional folder for it to look in?

Not that I am aware of. The folders that get copied (and thus searched) are controlled by the use of the #include directive in the main .ino file.