Delphi "E2161 Error: RLINK32: Error opening file ________. Drf" during build all

I am trying to solve a problem with a set of packages that seem to have dependency problems . Sometimes during build everything I get this error:

Delphi "E2161 Error: RLINK32: Error opening file ________. Drf"

What does this mean / indicate, and what is a drf file?

+4
source share
5 answers

It seems like this turned out to be the main problem / solution.

Open all the packages for which you have the source code and specify the compilation option: Rebuild Explicitly instead of Rebuild If Necessary.

+3
source

In addition to solving the β€œcannot find drf file” problem when compiling packages , I also came across Delphi Error Report # 44134 , in which a commenter mentions that the problem is that your .dpk files are in the same directory as your .pas files when the same directory is in the library path and rebuild as needed.

Thus, you have three options for resolving this issue:

  • Disable rebuild as needed. This is apparently the most common solution.
  • Put the package files ( *.dpk , *.dproj ) in a separate directory and then reinstall the packages. I have done this with success.
  • Remove the directory containing your .dpk and .pas files from the library path. Please note that Delphi will add it back under certain circumstances, including when installing / reinstalling your package.
+4
source

From http://www.delphifaq.com/faq/delphi/delphi_ide/f157.shtml :

When you compile packages, you can specify what packages should be for communication. The project requirements package is saved in a temporary Windows resource file with the extension .DRF.

Whatever the file with many underscores, the linker is most likely looking for it in what it thinks of tempdirectory (you can confirm this using filemon ). The explanation in DelphiFaq, where the invalid% TEMP% is the culprit, is as likely as any reason.

+2
source

Hmm ... never heard of them. I was just looking for a project that inspired the question you contacted, and there is nothing there with the "DRF" extension. Checking here does not cause anything related to Delphi. But the fact that this is a linker error, not a compiler error, will make me assume that the first two letters indicate "Delphi Resource".

Try searching the project directory tree and see if you can find anything with the DRF extension. If so, try opening it with a text editor to see if it is readable, and if not, try a hex editor if you know anything about reading binary file formats. See if you can figure it out.

If you don't find it, Delphi will probably get it somewhere in the code that it compiles. Try running a grep search for "DRF" in the directory tree and see if anything works.

+1
source

Sometimes the problem was allowing file access.

The workaround was launched by Delphi as an Administrator.

0
source

All Articles