How to compile GUI code using Delphi 7 command line?

146 Views Asked by At

I have Delphi 7 as my IDE, which successfully compiles GUI code through the IDE and creates an executable. I want to compile the same code through the command-line using dcc32.exe, which is Delphi 7's compiler. I have a .cfg file created by the IDE and a .dpr which is my project file.

When I run the following command:

dcc32.exe -B -Q abc.dpr

Or:

dcc32.exe abc.cfg

Both commands throw the following error:

Borland Delphi Version 15.0
Copyright (c) 1983,2002 Borland Software Corporation
Fatal: Required package 'VirtualTreesD7' not found

But the same abc.dpr file compiles correctly through the Delphi 7 IDE.

Here is my abc.cfg file:

-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J+
-$K-
-$L+
-$M-
-$N+
-$O-
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-GP
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
-H+
-W-
-M
-$M16384,1048576
-K$00400000
-E"C:\bin"
-LE"C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl"
-LN"C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl"
-U"components\VCLZip\Delphi7;C:\VirtualTreeView-Lazarus-4.8\Source;C:\PngComponents\Source"
-O"components\VCLZip\Delphi7;C:\VirtualTreeView-Lazarus-4.8\Source;C:\PngComponents\Source"
-I"components\VCLZip\Delphi7;C:\VirtualTreeView-Lazarus-4.8\Source;C:\PngComponents\Source"
-R"components\VCLZip\Delphi7;C:\VirtualTreeView-Lazarus-4.8\Source;C:\PngComponents\Source"
-LUVirtualTreesD7

Can anyone help me to resolve this issue? I need to compile Delphi 7 GUI code through command-line via a script.

1

There are 1 best solutions below

0
BND On BEST ANSWER

As @RemyLebeau suggested, I could able to compile Delphi GUI code using following ways Copying VirtualTreesD7.dcp file in my Delphi GUI Source Code directory OR Including the path where VirtualTreesD7.dcp is located in "Search Path" i.e. in .cfg file of my project.

Issue stands resolved now!