This error is consecutive to the new version of InstantFPC:
const
Version = '1.3';
// 1.3 compile in a separate directory, so that parallel invocations do not overwrite link.res files
And there are several errors with this new version:
-the '.exe' extension for Windows executable files is not added when moving the output file from this new separate directory to the cache directory (if InstantFPC is running in Windows, of course):
// move from build directory to cache
if not RenameFile(BuildOutputFilename,OutputFilename) then begin
writeln('unable to move "',BuildOutputFilename,'" to "',OutputFilename,'"');
-anyhow, this moving is using a rename operation (quicker than a copy), but the former file (if already present in the cache) is not deleted first. Which gives another error during this operation, after the first call,
-and finally the deletion of the whole separate directory (i.e. __tmpxxxx ) is not OK because Windows is returning an ERROR_SHARING_VIOLATION (probably related to the FPC compiler operation, I guess):
if not RemoveDir(Directory) then begin
writeln('unable to delete directory "'+Directory+'"');
That makes a lot of bugs, and I've still not succeeded to fix the last one (i.e. directory deletion).
You should use the version coming with the 2.6.2 version of FPC instead (i.e. InstantFPC version 1.2). This one is working properly. I've got positive tests with it:
- take the source code of FPC 2.6.2,
- extract the InstantFPC source (found in 'utils'),
- and recompile it: fpc InstantFPC
Note: don't forget to replace the current InstantFPC.exe file present in your FPC binary directory with this one (i.e. version 1.2), if you plan to use it instead.