3
votes

When compiling a Delphi project calling DCC32.EXE from a script, no .dcu files are generated.

Is there a command-line switch (or .cfg setting) to make the compiler create dcu's? Will the compiler then also check the .pas file and re-create the .dcu if the source has changed?

(I've seen there's a similar question for the Delphi 6 compiler, but I haven't been able to find this for newer versions of Delphi)

3
So what version are you on, then?Mason Wheeler
Do you have reason to believe that a solution for Delphi 6 wouldn't apply to other versions as well?Rob Kennedy
I'm not sure that there is a way to get the compiler to /no/t create a DCU file for every PAS file.Nick Hodges
Or, in other words, what is making you think that no DCU files are being generated?Nick Hodges

3 Answers

6
votes

-m (make) or -b (build) will tell the compiler to flush .dcu files to disk. Without either of those switches, the compiler will only compile .dcus into memory.

2
votes

The commandline switch to specify where dcu's should go is the -N0 (letter N, digit zero) switch. If you don't specify this however, the dcu's should still be generated, but end up in the same directory(ies) as the pas file(s) from which they were generated.

2
votes

For some old programs we are still using Borland C++Builder 5. I had the task to make some Delphi projects buildable on the CmdLine. Therefore I had to change the generated make files of bpr2mak.

Starting with the tip from Marjan Venema I found out:

  • option -N<path> or -N0<path> defines the output path for dcu files
  • option -N1<path> defines the output path for hpp files
  • option -N2<path> defines the output path for obj files