Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

build directory keeps deleted files resulting in "multiple definition" errors during link #1056

Open
@phord

Description

@phord

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.

  1. 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"
    }

  2. I created a file named src/foo.cpp to be included with my project. It defines a single function.

  3. I compiled the project with Arduino: Verify. The build succeeded.

  4. I clicked on "bar.cpp" in the File Explorer and pressed F2 to rename it.

  5. I changed the name to bar.cpp.

  6. I compiled the project with Arduino: Verify. The build failed with "multiple definition.

  7. When I look in my test-build/sketch directory, I see both foo.cpp and bar.cpp and related build output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions