Go Down

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


If you want to include a header file in an '.ino' sketch, you use either
Code: [Select]
#include "header.h"
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).


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

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


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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131