I am getting the same error consistently on Windows 7. I have to wait several minutes before recompiling my program after each test and it gets really annoying really fast.
I did nothing fancy, just made a file in the IDE and run it, it's a couple of lines, rudimentary processing a text file. Tried the fpc command-line compiler, the result is the same. After running the program, the .EXE si locked for a while and I can't delete it in windows, can't del /f as administrator.
I got this error using 2.4.2, downloaded the latest 2.6.0, error persists. I have no idea why it started doing it now. There are no spaces in the path or name, nothing changed on my computer ...
If this goes on, I will probably have to learn another language? There is no reasonable compiler for Pascal other than freepascal. I am getting desperate, being locked out of my work.
edit: okay, I found a "workaround" - renaming the source before every compilation. But that is not really far in terms of comfort neither.