I am using the stand alone Arduino IDE to build some projects, and I have a few .cpp files now, but during work I renamed them .c and back. When compiling the project now (with Ctrl-R), it is still trying to compile the .c files. But, I don't even see them on disk!

Changing the .cpp makes no difference. I am used to IDEs having some kind of project file, or a "clean project" option, but I cannot find those here.

  • 1
    are the files open in tabs in IDE? IDE takes source code from the editors. a 'sketch' is a folder with source files. all are compiled
    – Juraj
    Commented Jan 10, 2021 at 16:55
  • 1
    The Arduino IDE copies all files to a tmp folder. Try restarting the IDE.
    – Gerben
    Commented Jan 10, 2021 at 18:49
  • A restart did it. Commented Jan 10, 2021 at 18:56

1 Answer 1


The Arduino IDE does not monitor changes to open files. So if you rename or change a file externally (i.e. in another editor), the IDE won't update the file contents. Therefore, after such a change, a restart might be necessary.

Note: If you use another editor to change a file but only compile (and upload) in the IDE, this will work, because the compiler correctly reads the updated file. But editing the source in the IDE and an external editor at the same time might overwrite either change!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.