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
Bear with me on this one, as it is a bit complicated to explain :) Also, sorry if this is a dupe - I tried searching, but found nothing.
The scenario:
OS is Windows
You have a sketch folder named "Test"
You have an .ino file and at least one .h file in that folder (Named test.ino and a.h)
(The sketch file includes the .h file)
In an alphabetical order, the .h file's name is ahead the .ino file's name
The case of the first letter of the .ino file's name does not match the case of the sketch folder's name's first letter (The other letters don't matter)
The bug:
When you load this sketch into the IDE, the .h file will come before the .ino file in the tab list! This will result in the IDE treating the .h file as the main program code, and will pass that to the compiler.
Hi @notisrac , thanks for reporting. This is clearly a problem with case-sensitiveness so it should "only" affect Windows and OSX with case insensitive filesystems. I think the IDE should complain if there's no perfect match between main .ino and the containing folder. @cmaglie what do you think about this?
Bear with me on this one, as it is a bit complicated to explain :) Also, sorry if this is a dupe - I tried searching, but found nothing.
The scenario:
The bug:
When you load this sketch into the IDE, the .h file will come before the .ino file in the tab list! This will result in the IDE treating the .h file as the main program code, and will pass that to the compiler.
Example:
Sketch folder structure:
C:\Test\test.ino
C:\Test\a.h
Note the following:
test.ino:
a.h:
When trying to build this, the IDE will present you with an error message:
test:2:16: error: a.h: No such file or directory
Further analysis of the output panel reveals the cause of the error message:
Note, that both of the
arduino-builder
executions get thea.h
as the file to be built, just likeavr-g++
getsa.h.cpp
.This does not happen in any other case, than this! (Try renaming
a.h
toz.h
)Tested with v1.8.6, v1.8.7, v1.8.7 Hourly Build 2018/09/20 02:27, 1.8.14 Hourly Build 2021/03/09 09:33
So there are two questions I have regarding this issue:
Again, sorry if this is a duplicate.
The text was updated successfully, but these errors were encountered: