Show: Delphi C++
Display Preferences

Delphi Compiler

From RAD Studio XE3
Jump to: navigation, search

Go Up to Delphi Compiler Project Options

Project > Options > Delphi Compiler

Contents

Use this page to set the Delphi compiler options for the current project.

Note: Not all of the options described here are available for all types of projects. For example, DCP output directory does not appear for C++ projects.
Options Description

Target, Apply, Save

See Target Options.

Common items

See Common Items on Project Options Pages.



Delphi Compiler options Description

Conditional defines

Specify the symbols referenced in your conditional compiler directives. Use a semicolon to separate multiple symbols. For example, you might type:

DEBUG;Platform32Bit

Click Ellipsis to open the Conditional defines dialog box.

DCP output directory

Specifies where the .dcp file is placed at compilation time. If left blank, the global DCP output directory specified in the Tools > Options > Environment Options > Delphi Options > Library page is used instead.

The Ellipsis pop-up button opens an <ordered-list> dialog box for selecting and adding directories, as described in Common Items on Project Options Pages.

Output directory

Specifies the where the compiler should put the executable file. The Ellipsis pop-up button opens an <ordered-list> dialog box for selecting and adding directories, as described in Common Items on Project Options Pages.

Package output directory

Specifies where the compiler puts generated package files (.BPL). The Ellipsis pop-up button opens an <ordered-list> dialog box for selecting and adding directories, as described in Common Items on Project Options Pages.

Search path
(-R, -U, -O, -N)

Specifies the location of your source files. Only those files on the compiler's search path or the library search path are included in the build. If you try to build your project with a file not on the search path, you will receive a compiler error. You must include the entire search path.Separate multiple directory path names with a semicolon. Whitespace before or after the semicolon is allowed but not required. Relative and absolute path names are allowed, including path names relative to the current position.

Unit aliases

Useful for backwards compatibility. Specify alias names for units that may have changed names or were merged into a single unit. The format is

<oldunit>=<newunit>

For example:

Forms=Xforms

Separate multiple aliases with semicolons. The default value for Delphi is WinTypes=Windows;WinProcs=Windows.Default. The Ellipsis pop-up button opens an <ordered-list> dialog box for selecting and adding unit aliases, as described in Common Items on Project Options Pages.

Unit output directory

Specifies a separate directory to contain the .dcu. ClickEllipsis to open a Browse for Folder dialog box.

Unit scope names

Specifies the unit scope names (prefixes) for Delphi dotted namespaces, to allow you to use partially qualified names in your code and in your uses clause or #include.

There are two ways to add a unit scope name for a Delphi unit:

  • Specify the fully unit-scoped name in your uses clause. For example:
uses Vcl.Graphics;
  • Add the unit scope name (Vcl) to the Unit scope names field. Then the unit scope name Vcl is automatically applied to unit names that belong to that unit scope, and you can simply specify:
uses Graphics;

The Ellipsis pop-up button opens an <ordered-list> dialog box for selecting and adding unit scope names, as described in Common Items on Project Options Pages and Ordered list dialog box

Tips

  • To display the compiler options in the Messages window when you compile a project, choose Tools > Options > Environment Options and select Show command line. The next time you compile a project, both the command used to compile the project and the response file are displayed in the Messages window. The response file lists the compiler options and the files to be compiled.

  • To list multiple values in an edit box, separate the values with a semicolon. Alternatively, click the ellipsis button next to each edit box to add multiple values through an appropriate dialog box.
  • To specify operating-system environment variables in an edit box, use the following syntax: $(VariableName).
    For example, the $(Config) variable resolves to the specific configuration that is set in the Target field on the specific Project Options page where $(Config) is specified. If you specify $(Config) in a path and then build with a Debug configuration as the Target, $(Config) includes only the Debug directory, and the build can miss any elements that exist solely in the Release directory.

See Also

Personal tools
Previous Versions
In other languages