Delphi 6 command line compile: NO DCU’s

2020-07-24 05:08发布

When using dcc32 against the .dpr file it produces a dll but no dcu’s.

The project level .cfg is using the –N switch to set the path but nothing is in the directory specified. It must see the .cfg as the –E switch is working.

I tried to use brcc32/brc32 against the .dpr file before a call dcc32 but either one gives me the Error projectName.dpr 3 1: Expecting END?

I need the dcu’s from project1 for project2 which when I run the dcc32 against the .dpr it errors stating it can’t find the missing dcu’s from project1 for project2.

What steps, clc/utility need to be run to produce the dcu files? Running on XP with Delphi 6 installed. DCC32 v14 BRC32 v5.4

标签: delphi dcu
2条回答
等我变得足够好
2楼-- · 2020-07-24 05:45

Perhaps it is ignoring the -N switch because it doesn't have one? As far as I know the switch to specify where the dcu's should go is the -N0 switch. (Letter N, digit zero).

查看更多
甜甜的少女心
3楼-- · 2020-07-24 05:57

dcc32 --help is your friend here. In particular:

-N0<path> = unit .dcu output directory

(Note that D6 does not show this switch. D7 and more recent versions do.)

You do have to make sure that you include all necessary unit dependencies through the -U flag, resource dependencies through the -R flag, and so on. For instance:

dcc32 -B -CC -Q -E.\bin -IC:\home\work\Indy;C:\home\work\dUnit\src -LE.\bin -N0.\build -O"C:\home\work\Indy;C:\home\work\dUnit\src" -U"C:\home\work\Indy;C:\home\work\dUnit\src" -R"C:\Program Files\Borland\Delphi6\source\Indy;C:\Program Files\Borland\Delphi6\lib" SIP.dpr

EDIT: It doesn't help that dcc32 --help does NOT tell you about the -N0 switch. I found this out the hard way, and it was only on the advice of my boss (Guido Gybels) that I managed to get things working.

查看更多
登录 后发表回答