I'm using IDE v.2.2.0 to develop a large sketch (NSX75) comprising NSX75.ino and twelve .cpp / .h file pairs (25 files all up).
I decided to renamed one of the tab pairs:
Sens.cpp/Sens.h renamed to => Oil.cpp/Oil.h
However now I continually to get compilation errors associated with the old tab Sens.cpp
...\Documents\ARDUINO\SKETCHES\NSX75\Sens.cpp: In function 'void processO2()':
...\Documents\ARDUINO\SKETCHES\NSX75\Sens.cpp:31:23: error: 'FoXpin' was not declared in this scope
...\Documents\ARDUINO\SKETCHES\NSX75\Sens.cpp:31:23: note: suggested alternative: 'fopen'
exit status 1
Compilation error: exit status 1
If I SaveAs a different sketch (e.g. NSX75a) it compiles without errors, but if I Save revert back to NSX75 (using SaveAs again) the problem recurs.
If I compile the same sketch on another computer with IDE 2.2.0 the problem doesn't occur.
On my Win11, IDE2.2.0, I just tried adding a tab, renaming it, compiling, renaming the tab again, deleting it, but it worked for me. Maybe create the bad tab name again and try deleting it, or create the bad tab, compile, delete the bad tab, compile. Good luck.
Navigate to that directory (or rather to C:\Users\yourUsername\AppData\Local\Temp\arduino) and delete everything in there.
There might be another places in C:\Users\yourUsername\AppData\Local\Temp that refer to Arduino. Delete them as well.
If you don't manage with the above, an alternative might be to rename your sketch in Windows explorer (both the ino file and the directory that contains it) and load that sketch in the IDE.
If you're using Windows, Check in the Services if your WINDOWS DESKTOP EXPERIENCE
is running
I've seen this a lot of times with clients.
They create a folder on the desktop, it's called NewFolder by default, they rename it to whatever... and it's still called NewFolder
it's because it's not refreshing and that happens because WindowsDesktopExperience is not running or it's on Manual.
Try stopping and Starting the Service and put it on Auto and restart the computer