Solved

Fatal error at command line compile

Posted on 2007-03-17
11
1,863 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

728 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