Recent

Author Topic: Quick Compile leaves linknnnn.res files in project directory  (Read 338 times)

fafafooey

  • Newbie
  • Posts: 3
Hello, I don't know if I should post this in the Lazarus or FPC forum because it involves compiling but it might be a pre-compile issue.

Lazarus 2.2.2 32bit on Windows 7 64bit.

Every time I press "Quick Compile" there is a linknnnn.res (n = number) file created in the project directory.  The program quick compiles successfully but the linknnnn.res does not get deleted.  After a few days I have to sort by modified date and delete dozens of linknnnn.res files.  Compile and Build does not have this issue.  The file is 26kb and contains a lot of paths to files.  How can I stop these files from accumulating?

Thanks in advance for the help!

EDIT: I used sysinternals process monitor while doing a quick compile and it shows "ppc386.exe" creating "link3448.res" in the project directory but it doesn't delete it after the quick compile.
« Last Edit: July 28, 2022, 02:00:01 am by fafafooey »

PascalDragon

  • Hero Member
  • *****
  • Posts: 4540
  • Compiler Developer
Re: Quick Compile leaves linknnnn.res files in project directory
« Reply #1 on: July 28, 2022, 09:07:42 am »
When using Quick Compile Lazarus passes -s to the compiler which tells it not to execute the assembler and linker stages. The compiler will nevertheless generate a file that contains the information for the linker (the linkXXX.res file) as well as a script (e.g. ppas.bat on Windows) that allows to assemble and link nevertheless. From the compiler's point of view that these files are left is by design.

Whether the IDE should take care of deleting them when it triggers a Quick Compile, that is a different topic...

 

TinyPortal © 2005-2018