Go Down

Topic: Interesting compiler bug (Read 607 times) previous topic - next topic

quilkin

If you want to include a header file in an '.ino' sketch, you use either
Code: [Select]
#include "header.h"
or
Code: [Select]
#include <header.h>
AFAIK, the latter looks in the defined place(s) for header files, the former looks in the local folder (please correct me if I'm wrong on this).
But see what happens if you accidentally mistype and do this mixture:
Code: [Select]
#include <header.h"
The compiler seems to just get stuck trying to include the same line over and over again. It never finishes.
Same problem with any header file that's in one of your libraries.

There's no similar error in Atmel Studio (using the same compiler version 4.9.2, I think) - that gives a correct error message and stops. So it seems to be Arduino only (I'm using 1.8.1).

el_supremo

#1
Mar 26, 2017, 12:09 am Last Edit: Mar 26, 2017, 03:39 am by el_supremo
I [+edit] don't [/edit] get an error message with <stdio.h" and "stdio.h> using Arduino 1.8.2

Pete
[+edit] Brain fart fixed.
Don't send me technical questions via Private Message.

pert

I can reproduce with 1.8.1 but it's fixed in 1.8.2. I believe this was an issue with arduino-builder rather than the compiler.

the former looks in the local folder (please correct me if I'm wrong on this).
It looks first in the local folder and then in the same locations as with the angle brackets syntax.

Go Up