Case difference in the sketch folder and file name causes the IDE to try to compile the wrong file #8030
Labels
Component: IDE
The Arduino IDE
OS: Windows
Specific to the Windows version of the Arduino IDE
Type: Bug
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: