# Renamed tabs won't go away ... !

**URL:** <https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338>\
**Category:** IDE 2.x\
**Created:** [September 4, 2023, 10:36pm UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338 "2023-09-04T22:36:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninja2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ninja2/32/213836_2.png) [@ninja2](https://forum.arduino.cc/u/ninja2)\
**Post date:** [September 4, 2023, 10:36pm UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/1 "2023-09-04T22:36:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [September 5, 2023, 12:20am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/2 "2023-09-05T00:20:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [September 5, 2023, 3:25am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/3 "2023-09-05T03:25:31Z")

</div>

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

```plaintext
"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.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [September 5, 2023, 8:07am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/4 "2023-09-05T08:07:20Z")

</div>

The Arduino developers are tracking this bug here:

> <https://github.com/arduino/arduino-cli/issues/1240>
>
> \### Describe the problem
> 
> The previous file persists in the sketch build folde…r after a sketch code file with extension other than \`.ino\`/\`.pde\` is renamed.
> 
> 🐛 This can result in spurious compilation errors or confusing bugs. Arduino CLI users can work around the bug by adding the \`--clean\` flag to their command, but the only workaround for Arduino IDE users is to manually clean the build folder.
> 
> \### To reproduce
> 
> \`\`\`text
> $ arduino-cli version
> arduino-cli.exe Version: git-snapshot Commit: a735ddfd Date: 2023-01-15T01:00:07Z
> 
> $ echo "void asdf() {}" \> /tmp/FooSketch/foo.cpp
> 
> $ mv /tmp/FooSketch/foo.cpp /tmp/FooSketch/bar.cpp
> 
> $ arduino-cli compile --fqbn arduino:avr:uno /tmp/FooSketch
> C:\\Users\\per\\AppData\\Local\\Temp\\arduino\\sketch-2405C4C9F90028537C79B0744BCE536E\\sketch\\foo.cpp.o (symbol from plugin): In function \`asdf()':
> (.text+0x0): multiple definition of \`asdf()'
> C:\\Users\\per\\AppData\\Local\\Temp\\arduino\\sketch-2405C4C9F90028537C79B0744BCE536E\\sketch\\bar.cpp.o (symbol from plugin):(.text+0x0): first defined here
> collect2.exe: error: ld returned 1 exit status
> 
> 
> 
> Used platform Version Path
> arduino:avr 1.8.6 C:\\Users\\per\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6
> 
> Error during build: exit status 1
> 
> $ ls "C:/Users/per/AppData/Local/Temp/arduino/sketch-2405C4C9F90028537C79B0744BCE536E/sketch"
> bar.cpp bar.cpp.d bar.cpp.o foo.cpp foo.cpp.d foo.cpp.o FooSketch.ino.cpp FooSketch.ino.cpp.d FooSketch.ino.cpp.o
> \`\`\`
> 
> 🐛 \`foo.cpp\` is still present in the build folder even though not present in the sketch. \`foo.cpp\` is compiled in addition to \`bar.cpp\` and the primary sketch file.
> 
> \### Expected behavior
> 
> Files are always removed from the sketch build folder when no longer present in the sketch.
> 
> \### Arduino CLI version
> 
> \#### Original report
> 
> Arduino IDE 1.6.9
> 
> \#### Last verified with
> 
> a735ddfd
> 
> \### Operating system
> 
> \- Linux
> \- Windows
> 
> \### Operating system version
> 
> \- Mint
> \- 10
> 
> \### Additional context
> 
> \#### Workaround
> 
> \##### Arduino CLI users
> 
> Run an \`arduino-cli compile\` command with \[the \`--clean\` flag\](https://arduino.github.io/arduino-cli/dev/commands/arduino-cli\_compile/#options).
> 
> \##### Arduino IDE users
> 
> 1. Examine the compiler error message. It will show the path of the temporary build folder.
> For example, in this error:
> \`\`\`text
> C:\\Users\\per\\AppData\\Local\\Temp\\arduino\\sketch-7FD56777D981D6BAA3CCFAAECEDE6E54\\sketch\\foo.cpp.o (symbol from plugin): In function \`asdf()':
> (.text+0x0): multiple definition of \`asdf()'
> C:\\Users\\per\\AppData\\Local\\Temp\\arduino\\sketch-7FD56777D981D6BAA3CCFAAECEDE6E54\\sketch\\bar.cpp.o (symbol from plugin):(.text+0x0): first defined here
> collect2.exe: error: ld returned 1 exit status
>    
> exit status 1
>    
> Compilation error: exit status 1
> \`\`\`
> The temporary build folder is:
> \`\`\`text
> C:\\Users\\per\\AppData\\Local\\Temp\\arduino\\sketch-7FD56777D981D6BAA3CCFAAECEDE6E54\\sketch\\
> \`\`\`
> 1. Delete that folder.
> 
> \#### Additional reports
> 
> \- https://github.com/arduino/arduino-cli/issues/1699
> \- https://github.com/arduino/arduino-cli/issues/2058
> \- https://github.com/arduino/arduino-ide/issues/1691
> \- https://github.com/arduino/arduino-ide/issues/1316
> \- https://github.com/arduino/arduino-ide/issues/970
> \- https://github.com/arduino/Arduino/issues/2072
> \- https://forum.arduino.cc/t/ide-and-compiler-clear/1077526
> \- https://forum.arduino.cc/t/changed-tab-name-in-sketch-still-linking-old-o-file/1046286
> \- https://forum.arduino.cc/t/weird-error-pointing-to-old-code/1113608
> \- https://forum.arduino.cc/t/ide2-bit-upset-need-help/1129513
> 
> \#### Keywords
> 
> \- rename
> \- header
> \- .h
> \- .cpp
> 
> \### Issue checklist
> 
> \- \[X\] I searched for previous reports in \[the issue tracker\](https://github.com/arduino/arduino-ide/issues?q=)
> \- \[X\] I verified the problem still occurs when using the latest \[nightly build\](https://www.arduino.cc/en/software#nightly-builds)
> \- \[X\] My report contains all necessary details

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](https://github.com/arduino/arduino-cli/issues/1240#user-content-workaround-ide)

---

<div class="post-metadata">

**Author:** ![ninja2](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ninja2/32/213836_2.png) [@ninja2](https://forum.arduino.cc/u/ninja2)\
**Post date:** [September 5, 2023, 8:54am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/5 "2023-09-05T08:54:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon76350110](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@anon76350110](https://forum.arduino.cc/u/anon76350110)\
**Post date:** [September 5, 2023, 11:28am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/6 "2023-09-05T11:28:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 3, 2024, 11:29am UTC](https://forum.arduino.cc/t/renamed-tabs-wont-go-away/1165338/7 "2024-03-03T11:29:30Z")

</div>

Closed on March 3, 2024, 11:29am UTC

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