DCC32 compiler configuration file and command line parameter precedence

6.8k views Asked by At

I am trying to build first time my Delphi application through command line using DCC32. I have few doubts regarding the configuration file of my project. There are some search paths I have to add to project when compiling through IDE. When I remove them, the compilation fails.

Now if I compile it through command line is it need to specify configuration file details or the search path parameters?

without any parameters:

dcc32.exe   project1.dpr 

with some parameters:

dcc32.exe -u%Shared% -ND:\out project1.dpr

I have following doubts:

  1. if the config file details are not mentioned then it will take settings automtically from project.cfg (created by IDE)??
  2. if yes then if i mentioned the -U,-N options in command line then it will override All the settings which are in .cfg ile?
  3. This question sounds foolish but want to know What is use of compiling through command line over IDE?

Please provide some help to resolve my doubts. Any information related to dcc32 compilation options will be appreciated.

2

There are 2 answers

2
TLama On BEST ANSWER

1. - If the project config file is not specified in the command line options, will the settings be taken from the project's cfg file generated by IDE ?

Yes.


2. - When I use the -U, -N options in command line will that override all the settings from a project cfg file ?

No. Command line options takes precedence though, but only those options you specify will override the settings from the project's *.cfg file, not the whole configuration


3. Is there a difference between compilation from command line and compilation from IDE ?

No. There is no difference speaking about Delphi 5. From my view, the command line way just brings you the possibility to automate a build process through command line batch without need of opening IDE.

0
500 - Internal Server Error On

It's been a while, but I believe you are correct in your assumptions about the command-line vs the .cfg file. You can verify this yourself by having one path in the .cfg and specifying a different one on the command line and, say, have an error in the file that the .cfg would reference and see if the compiler hits the error.

Compiling from the command-line is convenient for automated build systems but is otherwise the same as compiling through the IDE.