difference between <> and ""

Hi,

I have seen in different sketches that some people have included libraries this way

#include "SoftwareSerial.h"

and some

#include <SoftwareSerial.h>

is the any reason for the difference?

Thanks

Steve

Hi,

To Quote sterretje

#include "filename.h" will look in the sketch folder first and next in the library directories
#include <filename.h> will only look in the library directories

http://forum.arduino.cc/index.php?topic=378506.0

Hope it helps.. Tom.. :slight_smile:

1 Like

Tsjeeh, someone remembers my posts :wink: I'm flattered :smiley:

Tom, can you fix the links please.

...and just to make it difficult, the Arduino IDE will look wherever it damn well wants !

In many cases (against C style), you don't have to 'include' anything - the build script will just 'hoover up' any appropriately named files (c, h, cpp etc) without any regard to any known discipline.
Keep your source files under control... Arduino IDE won't!

And if a library file uses

   #include "file.h"

...the IDE does not find the file in the sketch directory. Grrr...

Thanks :slight_smile: