Skip to content

Compilation fails when case of .ino file does not match case of folder it is located in #11551

Closed
@positron96

Description

@positron96

I have a small program with 1 .ino file and 1 .h file (here it is: https://github.com/vhar/withrottle). It's for esp8266 core, but it probably doesn't matter.

The .ino file is named WiThrottle.ino, the header is Config.h.

If the project folder is named withrottle (lowercase), then when I click Verify/Compile in Arduino IDE, the IDE converts Config.h into Config.h.cpp, adds stuff from .ino file into it, which makes the order of includes wrong. Config.h uses types that are included in .ino file, but in resulting .cpp the contents of Config.h goes before the contents of .ino file, so compilation fails.

If the project folder is named WiThrottle, than compilation goes fine (the cpp file is made from .ino file, not from .h file).

Since this is happening on Windows (and Windows filesystem is case-insensitive), this looks like a hard to find and hard to fix bug.

Tested on IDE versions 1.8.13, 1.8.15, Windows x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions