build directory keeps deleted files resulting in "multiple definition" errors during link #1056
Description
When I rename a source file in an arduino project and the "output" folder is set in arduino.json, I get a build error because the old filename is still in the output folder.
-
I created a project with the "Blink.ino" sketch and this arduino.json:
{
"board": "esp8266:esp8266:oak",
"configuration": "xtal=80,vt=flash,exception=legacy,ssl=all,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600",
"sketch": "Blink.ino",
"output": "../test-build"
} -
I created a file named
src/foo.cpp
to be included with my project. It defines a single function. -
I compiled the project with
Arduino: Verify
. The build succeeded. -
I clicked on "bar.cpp" in the File Explorer and pressed F2 to rename it.
-
I changed the name to bar.cpp.
-
I compiled the project with
Arduino: Verify
. The build failed with "multiple definition. -
When I look in my
test-build/sketch
directory, I see bothfoo.cpp
andbar.cpp
and related build output.