delphicompiler-errorsdelphi-12-athensdelphi-ide

{dcc64 Error} E2042 Write error on '.\Win64\Debug\MyApp.exe' in Delphi IDE when compiling


Every time I try to compile and/or run my app I get this error:

[dcc64 Error] E2042 Write error on '.\Win64\Debug\MyApp.exe'

According to the Embarcadero docwiki the issue is:

The compiler encountered a write error while writing to an output file.

Most likely, the output disk is full.

But this definitely isn't the issue on my computer, because my disk isn't full:

Windows Explorer: "6,01 GB free" on target drive C:

I have 6 GB of space left. Surely that's enough?


Solution

  • This solved the issue for me:

    1. Made more free space on my hard drive. I got back 20+ GB of free space.
    2. Restarted computer.
    3. Ran Delphi as administrator.

    Now it's compiling and working perfectly fine.