Compile after deleting additional .PAS file

General TRichView support forum. Please post your questions here
Post Reply
Edward.Gentle
Posts: 1
Joined: Thu May 28, 2015 8:54 am
Location: South Africa
Contact:

Compile after deleting additional .PAS file

Post 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.
MagnusW
Posts: 24
Joined: Mon Aug 23, 2010 7:31 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17499
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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
Post Reply