Fatal error at command line compile

Trying to compile a Delphi Project at the command line like so
dcc32 "C:\Program Files\Borland\Delphi7\Projects\x\x.dpr"
And I get the error
Borland Delphi for Win32 compiler version 18.0
Copyright (c) 1983,2005 Borland Software Corporation
C:\Program Files\Borland\Delphi7\Projects\x\x.dpr(44) Fatal: F2063 Could not compile used unit 'MainMenu.pas'

However this compile fine in the IDE.
LVL 10
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

when you get that error, you also get the compile errors for the mainmenu.pas you get that fatal error because there were already some compilation errors in that unit. so .. what are they?
TheRealLokiSenior DeveloperCommented:
The actual error will be displayed above this message, scroll the "output" box up (the white box at the bottom of the unit editor)
TheRealLokiSenior DeveloperCommented:
oops, sorry wildzero, didn't see the dcc32 command. (also didn't see it was you, and figured this was a noob question :-D )
Have you changed to the correct directory to compile this? are all teh other required units available in the search path? (just guessing, as i've never had to do this manually sorry)
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

wildzeroAuthor Commented:
:P no worries.
Well what I done is moved my bat file from
and re-ran, and now I get a different error message so indeed it does seem to be something with the paths. As this compiles fine under the IDE I must have to specify in the command line my search paths - which is a bit of a bugger....
TheRealLokiSenior DeveloperCommented:
is there a bcc commandline to specify an @browse list file or something?
(away from delphi atm, so cant check)
wildzeroAuthor Commented:
I htink you use the
-U paramater
will look in to it more..
the way I am doing the command line builds is that I set in the system path the path to dcc32. then I call

dcc32 project.dpr

this takes care of the "local" units, included in the project configuration search path

then, for anything not in the project configuration search path I add it to it (from the ide) (I like to keep my command lines clean :) )
wildzeroAuthor Commented:
HI there,

Yeap the local units arn't a problem - it's just the other units from other components that I need to get added in there

Borland Delphi for Win32 compiler version 18.0
Copyright (c) 1983,2005 Borland Software Corporation
MainMenu.pas(7) Fatal: F1026 File not found: 'PdfLib_TLB.dcu'
well, as I said: either add those paths to the project settings, direcotires, search path; or specify them in the command line. there is really no other option here :)
There is a cool file called DCC32.cfg it allows you to set up your unit directories and such...makes it alot easier to use the command line compiler...

From the help file on dcc32.cfg

Here's an example DCC32.CFG file, defining some default directories for include, object, and unit files, and changing the default states of the $O and $R compiler directives:




Now, if you type:


the compiler performs as if you had typed the following:


Unit directories (-U) option

When you compile a program that uses units, the command-line compiler searches for source and compiled unit files in the current directory. The -U option lets you specify additional directories in which to search for units.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wildzeroAuthor Commented:
Hi there :-)
Where does this file go :D
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.