C++ (Shared Options)

From RAD Studio
Jump to: navigation, search

Go Up to Project Options Dialog Box


Project > Options > C++ (Shared Options)

Use this page to set paths to your directories and conditional defines. The settings on this page affect all the tools on the Project > Options dialog, such as compilers and linkers.

Options Description

Target, Apply, Save

See Target Options.

Common items

See Common Items on Project Options Pages.

Shared options support all platforms: The options on this page are shared among all the C++ compilers and thus are supported on all the supported target platforms.
Item Description Compiler/linker switches

BPI/Lib output

Tells the linker to place bpi/lib output files in the directory specified, if they are generated.

This option determines the output folder of the following files:

N/A

Conditional defines

Introduces symbols that are referenced in conditional compiler directives. Use semicolons to separate multiple symbols. For example, you might type: DEBUG;Platform32Bit.

Click Ellipsis to open the Conditional defines dialog box.

-D

Final output directory

Designates the directory where the final output of the build (such as the executable, OCX or DLL) is to be put. If you do not specify a final output directory, the intermediate output directory is used (described in this table).

This option determines the output folder of the following files:

N/A

Include path

Specifies the directories to be searched for include files. This is a set of include paths that are appended to any tool-specific include paths for the project as a whole. Standard include files are those you specify in angle brackets (<>) in an #include statement (for example, #include <myfile>).

-I

Intermediate output

Tells the linker to place intermediate output files in the directory specified. Also tells the compilers (dcc, bcc, tasm, brcc) where to put their compiled output; these are normally .OBJ and .RCS files. Currently files that qualify for this placement are the linker state files. The map debug file and TDS debug file are saved in the same directory as the output image, unless otherwise specified for the map debug file.

N/A

Library path

Specifies the directories the linker searches if there is no explicit path given for an .LIB module in the compile/link statement.

The Library Path option uses the following linker command-line syntax:

/L<PathSpec>[;<PathSpec>][..]

The linker uses the specified library search path(s) if there is no explicit path given for the .LIB file and the linker cannot find the library file in the current directory. For example, the command

ILINK32 /Lc:\mylibs;.\libs splash.\common\logo,,,utils logolib

directs the linker to first search the current directory for SPLASH.LIB. If it is not found in the current directory, the linker then searches for the file in the C:\MYLIBS directory, and then in the .\LIBs directory. However, notice that the linker does not use the library search paths to find the file LOGO.LIB because an explicit path was given for this file.

-L

_TCHAR maps to

Controls the floating definition of _TCHAR. The choices are:

  • wchar_t (this is the typical default; for C++ applications that use the VCL or FireMonkey)
  • char (this is the default for C++ applications that do not use the VCL or FireMonkey, such as C++ console applications)

Before you can set this option to wchar_t, your project must have an entry point called _tmain or _tWinMain. New projects (created with RAD Studio) have these entry points by default, but imported projects might need to have these entry points added by hand.

Selecting wchar_t does the following:

  • Sets the UNICODE and _UNICODE defines.
  • Instructs the linker to use a library of wide versions.
  • Instructs C++ RTL, standard library, and Windows API functions to float to their wide definitions. See Floating Functions.

If you select char, _TCHAR does not float to a wide definition.

-tU

See Also