Solved

Fatal error at command line compile

Posted on 2007-03-17
11
1,842 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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