Compiling and Linking from the Command Line

From RAD Studio
Jump to: navigation, search

Go Up to Compiling Packages


When you compile from the command line, you can use the package-specific switches listed in the following table.

Package-specific Delphi command-line compiler switches:

Switch Purpose

-$G-

Disables creation of imported data references. Using this switch increases memory-access efficiency, but prevents packages compiled with it from referencing variables in other packages.

-LEpath

Specifies the directory where the package file (.bpl) will be placed.

-LNpath

Specifies the directory where the package file (.dcp) will be placed.

-LUpackage

Use packages.

-Z

Prevents a package from being implicitly recompiled later. Use when compiling packages that provide low-level functionality, that change infrequently between builds, or whose source code will not be distributed.


Note: Using the -$G- switch may prevent a package from being used in the same application with other packages. Other command-line options may be used, if appropriate, when compiling packages. See DCC32.EXE, the Delphi Command Line Compiler for information on command-line options not discussed here.

Package-specific C++ command-line compiler and linker switches:

Switch Purpose

tP

Generates a project as a package (compiler switch).

-D "description"

Saves the specified description with the package.

-Gb

Generates the .bpl filename.

-Gi

Saves the generated .bpi file. Included by default in package project files.

-Gpd

Generates a design-time-only package.

-Gpr

Generates a runtime-only package.

-Gl

Generates a .lib file.

-Tpp

Builds the project as a package. Included by default in package project files.


See Also