Delphi Compiler

From RAD Studio
Jump to: navigation, search

Go Up to Building


Project > Options > Building > Delphi Compiler

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

=link

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.


Item Description Compiler switches All platforms supported unless noted

Conditional defines

Specifies 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.

-D

DCP output directory

Specifies where the compiled package file (.dcp) 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.

-LN

Framework search path

Specifies the search path or paths where the compiler should look for the frameworks.

Separate multiple aliases with semicolons.

‑‑frameworkpath

iOS Device (64-bit)

Output directory

Specifies 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.

-E

Package output directory

Specifies where the compiler puts generated package files. 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.

This option determines the output folder of the following files:

-LE

Search path

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.

-U

Show general messages

Set this option to True in order to show information messages from the compiler in the Messages View output tab.

System library root path

Specifies the root path or paths where the compiler should look for the system libraries.

Separate multiple aliases with semicolons.

‑‑syslibroot

iOS Device (64-bit)

Unit aliases

Useful for backward 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.

-A

Unit output directory

Specifies a separate directory to contain the compiled units (.dcu). Click Ellipsis to open a Browse for Folder dialog box.

-NU

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 FMX.Graphics; (Delphi)
  • Add the unit scope name (FMX) to the Unit scope names field. Then the unit scope name FMX is automatically applied to unit names that belong to that unit scope, and you can simply specify:
    • uses Graphics; (Delphi)

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.

-NS|

Use MSBuild externally to compile

If enabled, your project is built outside the IDE using MSBuild.

You might want to use this option if RAD Studio runs out of memory when you build your project group.

You must:

  • Save your project before attempting to do a build when using this option.
  • Enable the Include remote debug symbols option on the Linking page if you want to use the embedded debugger with your MSBuild project.

Default = False

Note: Use this option to prevent issues where the command line to DCC32 exceeds 3200 bytes. When this option is enabled, the MSBuild script auto-generates a response file <your project>.cmds which is passed to DCC32.

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 or IDE-defined 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.

Child Pages

See Also