Not planned
Description
Describe the problem
Hello everyone,
I have files like :
myfile.ino
src/mylib.cpp
src/mylib.h
I get an error at compile time on mylib.h
:
[...]\myfile\src\mylib.h:28:55: error: 'TOTO' was not declared in this scope
In fact, mylib.cpp
is not include in myfile
, because i don't find anyway to avoid compile of mylib.cpp
, I just changed the name of directory from src
to src2
, so my files are now:
myfile.ino
src2/mylib.cpp
src2/mylib.h
But the error is still the same with a wrong directory which doesn't exist anymore (\myfile\src\mylib.h
):
[...]\myfile\src\mylib.h:28:55: error: 'TOTO' was not declared in this scope
The fault occurs when the files are under a subfolder that contains any name starting with s
.
The fault does not occur after I change the folder name to something that does not start with s
.
To reproduce
- Create a sketch.
- Create
src
directory inside. - Create some library inside
src/
which produces a compile error. - Change name of
src/
tos/
. - Compile the sketch again.
Expected behavior
Checking that files still exists in path
Arduino IDE version
2.3.2
Operating system
Windows
Operating system version
10
Issue checklist
- I searched for previous reports inI verified the problem still occurs when using the latestMy report contains all necessary details
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
.ino
sketch code file #1240per1234 commentedon May 26, 2024
Hi @FroggyCorp. Thanks for taking the time to submit an issue.
I see we have another report about this at #1240.
It is 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.
You can follow the instructions at #1240 (comment) to workaround the bug.
I think the fact the fault no longer occurred after you did that was purely coincidental. I tested it myself and the fault still occurs for me even after renaming the folder to something that does not start with
s
. My guess is that you saved the sketch to a different name at the same time. Doing that causes a new temporary build folder to be used.FroggyCorp commentedon May 27, 2024
Hey,
No problem :)