Re: Command Line Compiler Config File



I'm quite happy to use dcc32.cfg files at this point. I have global
settings in the dcc32.cfg file in the dcc32.exe folder, and project
specific settings in the dcc32.cfg file in the project folder.

I just wanted to make sure that the command line compiler is not
pulling settings from anywhere else. I have my debug configuration in
the IDE, and my release configuration in the dcc32.cfg files.

--Bruce

On 25 Mar 2007 19:01:54 -0800, "Bruce McGee" <bmcgee@xxxxxxxxxxxx>
wrote:

Bruce wrote:

I have always used the command line compiler to do automated and
release builds. I couldn't find anything on the command line compiler
in the help file, so I wanted to make sure I was understanding this
correctly and that nothing has changed.

My understanding is that DCC32.exe uses the DCC32.cfg file that is in
the same folder as DCC32.exe, and you can override and/or add new
compiler settings by placing a DCC32.cfg file in the same folder as
your project <projectname>.dpr file.

At one point, a <projectname>.cfg file was also created by the IDE,
and I found I had to delete that file before doing a build to prevent
the command line compiler from using the IDE settings in that file. I
don't think this file is being created anymore (at least I don't see
it in D2007).

I'm assuming this is the extent of it, and that the command line
compiler does not try to pull compiler settings out of the bdsproj or
dproj files.

Do I have this correct?

The .cfg file is used to create the new .dproj files for Delphi 2007
when you load older projects, but it isn't used when compiling from
either the command line or IDE. There is still a dcc32.cfg that gets
used, but you can turn that off using the --no-config switch.

The IDE reads it's build settings from the .dproj file (of course), but
the command line compiler doesn't.

In the environment options, you can set the IDE compiler to show you
the full DCC32 command line you would use to get the same compile and
use that in your batch file.

Another option might be to create your different build configurations
in the IDE and use MSBuild from the command line. You need to set some
environment variables first:

set path=%path%;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
set path=%path%;C:\Program Files\CodeGear\RAD Studio\5.0
set path=%path%;C:\Documents and Settings\All Users\Documents\RAD
Studio\5.0
set BDS=C:\Program Files\CodeGear\RAD Studio\5.0
set FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework\
set FrameworkVersion=v2.0.50727

This will build the default configuration:

msbuild MyProj.dproj

And this will specifically build the "Release" configuration:

msbuild MyProj.dproj /property:configuration=Release

Finally, there is my favourite option: FinalBuilder. It currently
supports MSBuild projects, and will have specific support added for
Delphi 2007 shortly.

Of course, the downside is that if you have a big investment in .cfg
files, they will have to be converted.
.



Relevant Pages

  • Re: K&R 1.5.1 exercise
    ... > the EXE file and run it by hand in a standalone console window. ... > The C beginner using K&R2 is better served by a command line compiler than ... > by any kind of IDE. ... > with a command line environment in mind. ...
    (comp.lang.c)
  • Re: Command line compiler when there are images in the project: any suggestion?
    ... Nicholas Paldino ... >>> I have to use the command line compiler and I use the following command>>> line: ... >>> On the other side, if I try to compile it with the VS IDE everything>>> works ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: P.S. Why would release static lib be significantly larger then my debug build?
    ... even though the huge library of the first project is included in the ... Is there some place that tells me where the compiler / linker switches ... the project properties dialog to observe the effect of changing some IDE ... command prompt), you'll be able to figure out the mapping. ...
    (microsoft.public.vc.language)
  • Re: Command Line Compiler Config File
    ... I couldn't find anything on the command line compiler ... At one point, a.cfg file was also created by the IDE, ... the command line compiler from using the IDE settings in that file. ... in the IDE and use MSBuild from the command line. ...
    (borland.public.delphi.non-technical)
  • Re: Trouble with "continue" in try/catch block
    ... This is the command line as written by the compiler in the output window: ... No settings have been changed compared to the default settings after the project has been created. ... can you tell me what compiler version you are using and what ...
    (microsoft.public.windowsce.embedded.vc)