RAD Studio
ContentsIndex
PreviousUpNext
DCC32.EXE, the Delphi Command Line Compiler

DCC32 is the Delphi (Object Pascal) command line compiler. 

To display command line help, enter:

dcc32

or:

dcc32 —h

or:

dcc32 —help

 

C:\>dcc32
CodeGear Delphi for Win32 compiler version 18.5
Copyright (c) 1983,2007 CodeGear

Syntax: dcc32 [options] filename [options]

  -A <unit>=<alias> = Set unit alias
  -B = Build all units
  -CC = Console target
  -CG = GUI target
  -D<syms> = Define conditionals
  -E<path> = EXE/DLL output directory
  -F<offset> = Find error
  -GD = Detailed map file
  -GP = Map file with publics
  -GS = Map file with segments
  -H = Output hint messages
  -I<paths> = Include directories
  -J = Generate C .obj file
  -JP = Generate C++ object file
  -JPN = Generate C++ .obj, include namespace
  -JPE = Generate C++ .obj, export all symbols
  -JPH = Generate C++ .obj, export symbols, generate header .hpp files 
  -JPHNE = Generate C++ .obj file, .hpp file, in namespace, export all
  -JL = Generate package .lib, .bpi, and all .hpp files for C++
  -K<addr> = Set image base addr
  -LE<path> = package .bpl output directory
  -LN<path> = package .dcp output directory
  -LU<package> = Use package
  -M = Make modified units
  -N0<package> = Use package
  -M = Make modified units
  -N0<path> = unit .dcu output directory
  -NH<path> = unit .hpp output directory
  -NO<path> = unit .obj output directory
  -NB<path> = unit .bpi output directory
  -NS<namespace> = Namespace search path
  -O<paths>  = Object directories
  -P = look for 8.3 file names also
  -Q = Quiet compile
  -R<paths> = Resource directories
  -U<paths> = Unit directories
  -V = Debug information in EXE
  -VR = Generate remote debug (RSM)
  -W[+|-][warn_id] = Output warning messages
  -Z = Output 'never build' DCPs
  -$<dir> = Compiler directive
  --help = Show this help screen
  --version = Show name and version
  --codepage:<cp> = specify source file encoding
  --default-namespace:<namespace> = set namespace
  --depends = output unit dependency information
  --doc = output XML documentation
  --drc = output resource string .drc file
  --no-config = do not load default DCC32.CFG file
  --description:<string> = set executable description
Compiler switches: -$<state> (defaults are shown below)
  A8  Aligned record fields
  B-  Full boolean Evaluation
  C+  Evaluate assertions at runtime
  D+  Debug information
  G+  Use imported data references
  H+  Use long strings by default
  I+  I/O checking
  J-  Writeable structured consts
  L+  Local debug symbols
  M-  Runtime type info
  O+  Optimization
  P+  Open string params
  Q-  Integer overflow checking
  R-  Range checking
  T-  Typed @ operator
  U-  Pentium(tm)-safe divide
  V+  Strict var-strings
  W-  Generate stack frames
  X+  Extended syntax
  Y+  Symbol reference info
  Z1  Minimum size of enum types

If you want to generate .hpp files (and the corresponding .obj) from a .pas file, you should use -JPHNE.  

You can also use -JL on the .dpk file containing the .pas file.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!