Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
positron96 opened this issue May 22, 2021 · 2 comments
Labels
Component: Compilation Related to compilation of Arduino sketches Type: Bug Type: Duplicate Another item already exists for this topic

Comments

@positron96
Copy link

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

@per1234
Copy link
Collaborator

per1234 commented May 22, 2021

Thanks for taking the time to submit an issue @positron96 .

I see we already have a prior issue report about this at #8030.

It's best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

@per1234 per1234 closed this as completed May 22, 2021
@per1234 per1234 added Component: Compilation Related to compilation of Arduino sketches Type: Bug Type: Duplicate Another item already exists for this topic labels May 22, 2021
@positron96
Copy link
Author

Thank you, @per1234. Somewhy that issue did not show up in search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Compilation Related to compilation of Arduino sketches Type: Bug Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

2 participants