Solved

Fatal error at command line compile

Posted on 2007-03-17
11
1,837 Views
Last Modified: 2011-09-30
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.
:-/
0
Comment
Question by:wildzero
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 28

Expert Comment

by:ciuly
ID: 18743011
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?
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 18746166
The actual error will be displayed above this message, scroll the "output" box up (the white box at the bottom of the unit editor)
0
 
LVL 17

Assisted Solution

by:TheRealLoki
TheRealLoki earned 25 total points
ID: 18746172
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)
0
 
LVL 10

Author Comment

by:wildzero
ID: 18746179
:P no worries.
Well what I done is moved my bat file from
SourceFolder\output
to
SourceFolder
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....
0
 
LVL 17

Expert Comment

by:TheRealLoki
ID: 18746464
is there a bcc commandline to specify an @browse list file or something?
(away from delphi atm, so cant check)
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 10

Author Comment

by:wildzero
ID: 18746698
I htink you use the
-U paramater
will look in to it more..
0
 
LVL 28

Expert Comment

by:ciuly
ID: 18746892
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 :) )
0
 
LVL 10

Author Comment

by:wildzero
ID: 18746964
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


ie
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'
0
 
LVL 28

Assisted Solution

by:ciuly
ciuly earned 25 total points
ID: 18746978
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 :)
0
 
LVL 6

Accepted Solution

by:
House_of_Dexter earned 75 total points
ID: 18813263
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:

-IC:\DELPHI\INC;C:\DELPHI\SRC

-OC:\DELPHI\ASM
-UC:\DELPHI\UNITS
-$R+

-$O-

Now, if you type:

dcc32 MYSTUFF

the compiler performs as if you had typed the following:

dcc32 -IC:\DELPHI\INC;C:\DELPHI\SRC -OC:\DELPHI\ASM -UC:\DELPHI\UNITS -$R+ -$O- MYSTUFF

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.
0
 
LVL 10

Author Comment

by:wildzero
ID: 18813349
Hi there :-)
Where does this file go :D
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now