You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was experiencing a strange bug by trying to compile the library from the local project folder, the compiler wasn't recognizing the #ifndef Espalexa_h at the beginning of Espalexa.h, after running an hexdump on the file i found out that there are three corrupted bytes (EF BB BF) at the beginning of the file:
(EDIT: those characters seem to be UTF-8 Byte Order Mark characters)
Those characters were recognized as a special unicode charcter an the #ifndef was not seen by the compiler.
This is subtle because for some reasons the library works perfectly if included from the Arduino libraries folder but instead it doesn't work if the code is copied and included from the sketch folder or other locations.
After removing those corrupted characters everything works fine.
The text was updated successfully, but these errors were encountered:
Thanks! I didn't know that, that makes more sense now.
Yes, i really don't understand why it doesn't compile in local folder but it compiles from library folder, but i tried both with 1.x and 2.x ide and neither worked, i don't know if you were also able to replicate the error...
I found someone having the same problem here, and there's also a solution posted to change the file encoding to remove those
shimo97
changed the title
[Found and solution proposed] Binary corruption in Espalexa.h preventing it to compile in some cases
[Found and solution proposed] Byte Order Mark in Espalexa.h preventing it to compile in some cases
Feb 25, 2024
I was experiencing a strange bug by trying to compile the library from the local project folder, the compiler wasn't recognizing the #ifndef Espalexa_h at the beginning of Espalexa.h, after running an hexdump on the file i found out that there are three corrupted bytes (EF BB BF) at the beginning of the file:
(EDIT: those characters seem to be UTF-8 Byte Order Mark characters)
Those characters were recognized as a special unicode charcter an the #ifndef was not seen by the compiler.
This is subtle because for some reasons the library works perfectly if included from the Arduino libraries folder but instead it doesn't work if the code is copied and included from the sketch folder or other locations.
After removing those corrupted characters everything works fine.
The text was updated successfully, but these errors were encountered: