Solved

Fatal error at command line compile

Posted on 2007-03-17
11
1,847 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:2266180
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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
 
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:2266180
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:2266180
2266180 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 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