Renamed tabs won't go away ... !

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.

How can I fix this?

TIA

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.

Your code is cached; I'm not sure where. You can try the below but I'm not sure if it is correct.

If you enable verbose output during compilation under file → preferences in the IDE and inspect the output, you will find lines like

"C:\\Users\\yourUsername\\AppData\\Local\\Temp\\arduino\\sketches\\F180B19F16C841C6A7B977D3C3D6063C" 

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.

The Arduino developers are tracking this bug here:

I confirm that the workaround of deleting the temporary build folder as explained by sterretje will fix the error:

https://github.com/arduino/arduino-cli/issues/1240#user-content-workaround-ide

OK, good to see it's being addressed already.
And thanks for the workaround info

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

that's why it works on another computer

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.