Page 1 of 1

Compile after deleting additional .PAS file

Posted: Thu May 28, 2015 9:11 am
by Edward.Gentle
Some advice please.
With older versions of Delphi it was possible to create a unit file and after compiling it to .DCU delete the .pas file.

Then one can continue to use the "objects" as created in the deleted pas file.

With the newer versions if I delete the pas file the application does not want to compile and gives me the following error:

[dcc32 Fatal Error] xxxxx.pas(7): F2063 Could not compile used unit 'xxx.pas'

I do not want to "recompile" the DCU.

Posted: Thu Jun 11, 2015 9:18 am
by MagnusW
Your problem may have to do with the build paths.

In older versions of Delphi the .dcu were put right next to, in the same directory as the .pas file.

Now, by default the .dcu files are put in the Win32/Debug or a similar build directory.

I did and experiment and moved the .dcu file to the the same directory as the deleted .pas file were located and then it compiled for me, just like in older versions of Delphi.

Posted: Tue Jul 07, 2015 10:29 am
by Sergey Tkachenko
In the new version, for Delphi packages, 32-bit Delphi dcu files are created in the same folder as pas files.
However,
- 64-bit dcu files are created in directories like Delphi64\XE8\Release
- for C++ packages, dcu files are created in directories like CBuilder32\XE8\Release