C++ Compiler
Go Up to Building
Project > Options > Building > C++ Compiler
Use this dialog box to set C++ Compiler options.
Contents
Options | Description |
---|---|
Target, Apply, Save |
See Target Options. |
Common items |
C++ Compilation Options
Item | Description | Compiler switches | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bccx64 | ||||||||||||||||
Enable exceptions |
Sets C++ exception handling. If this option is disabled (-x-) and you attempt to use exception handling routines in your code, the compiler generates error messages during compilation. Disabling this option makes it easier for you to remove exception handling information from programs; this might be useful if you are porting your code to other platforms or compilers. Disabling this option turns off only the compilation of exception handling code; your application can still include exception code if you link object and library files that were built with exceptions enabled (such as the C++Builder run-time libraries). Default =
|
Enable exceptions -x Destructor cleanup -xd Fast exception prologs -xf Global destructor count -xdg Hide exception variables -xv Location information -xp No DLL/MT destructor cleanup -xds Slow exception epilogs -xs |
Enable exceptions -fexceptions Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported |
N/A Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported |
N/A Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported Option not supported | ||||||||||||||
Enable RTTI |
Causes the compiler to generate code that allows run-time type identification (RTTI). Default = |
-RT | -frtti | N/A | N/A | ||||||||||||||
Honor member precision |
The compiler uses the declared precision for member pointer types. Use this option when a pointer to a derived class is explicitly cast as a pointer-to-member of a simpler base class (when the pointer is actually pointing to a derived class member). Default = |
-Vmp | Option not supported | Option not supported | Option not supported | ||||||||||||||
Member pointers |
Smallest possible Member pointers use the smallest possible representation that allows them to point to all members of their particular class. If the class is not fully defined at the point where the member pointer type is declared, the most general representation is chosen by the compiler and a warning is issued. Multiple inheritance Single inheritance Default* |
Smallest possible -Vmd
Single inheritance
|
Option not supported Option not supported Option not supported |
Option not supported Option not supported Option not supported |
Option not supported Option not supported Option not supported | ||||||||||||||
Template generation |
Default This is a convenient way of generating template instances. This is the default. External
|
Default -Jgd External -Jgx
|
Option not supported Option not supported |
Option not supported Option not supported |
Option not supported Option not supported | ||||||||||||||
Virtual tables |
Smart External Public Default = |
Smart -V External -V0 Public -V1 |
Option not supported Option not supported Option not supported |
Option not supported Option not supported Option not supported |
Option not supported Option not supported Option not supported |
Classic Compiler
Classic Compiler options | Description | Compiler switches | |||
---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bcc64x | ||
Use 'classic' Borland compiler |
Enables either the classic BCC32 compiler or the clang-enhanced BCC32C compiler as the C++ compiler for 32-bit Windows platforms. Use this option to switch a project from BCC32 to BCC32C and vice versa. You can set this option to:
Default = |
Option not supported |
Option not supported |
General Compilation Options
General Compilation options | Description | Compiler switches | |||
---|---|---|---|---|---|
bcc32 | bcc32c | bcc64 | bcc64x | ||
Calling convention |
Pascal |
-p |
Option not supported Hardcoded to C++17 |
Option not supported Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
C (-pc)* |
-pc | -mcdecl | -mcdecl | -mcdecl | |
_msfastcall (-pm) |
-pm | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Fastcall (register) (-pr) You can use the __pascal, __cdecl, or __stdcall keyword to specifically declare a function or subroutine using another calling convention. |
-pr | -mfastcall | -mfastcall | -mfastcall | |
stdcall (-ps) You can use the __cdecl, __pascal, __fastcall keyword to specifically declare a function or subroutine using another calling convention. Default = C (-pc) |
-ps | -mrtd, -mstdcall | -mrtd, -mstdcall | -mrtd, -mstdcall | |
C++ Language Standard | Select a C++ Language Standard version, the following are the available options:
|
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() |
Data Alignment |
Byte |
-a1 |
-fpack-struct=1 |
N/A | N/A |
Word (-a2) |
-a2 | -fpack-struct=2 | N/A | N/A | |
Double word (-a4) |
-a4 | -fpack-struct=4 | N/A | N/A | |
Quad word (-a8)* |
-a8 | -fpack-struct=8 | N/A | N/A | |
Paragraph (-a16) Default = Quad word (8) |
-a16 | -fpack-struct=16 | N/A | N/A | |
Disable C++ access control |
Tells the compiler not to enforce access control. That is, the compiler does not emit an error if a protected or private member is accessed when it should not be accessible. Use this option if you had code that BCC32 allowed, but BCC64 treats as violating access control (or better, update your code to match the rule used by BCC64). Default = |
Option not supported Hardcoded to C++17 |
N/A |
-fno-access-control |
-fno-access-control |
Enable batch compilation |
Enables batch compilation. When this option is enabled, all the source modules are passed to the C++ compiler on the same command line, instead calling the compiler once for each source module. For batch compiles, build events are generated for the entire batch compile, not for single files. Similarly, a batch compile uses one set of project options, with no per-file overrides allowed. If you are using a Clang-enhanced C++ compiler, you can use "Enable batch compilation" in combination with "Run C++ compiler in a separate process" to enable parallel compilation. Clang-enhanced compilers for 32-bit platforms stop the batch compilation after a file fails to compile. Default = | ||||
Maximum errors (-j) Causes batch compilation to stop after the specified number of errors has been detected. You can enter any number from 0 through 255. Default = Entering 0 causes compilation to continue until the end of the file or this warning limit has been reached, whichever comes first. |
-j
|
-ferror-limit
|
N/A | N/A | |
Maximum warnings (-g) Causes batch compilation to stop after the specified number of warnings has been detected. You can enter any number from 0 through 255. Default = Entering 0 causes compilation to continue until either the end of the file or this error limit has been reached, whichever comes first. |
-g
|
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Remove the temporary .rsp file
Removes the temporary .rsp file after batch compilation. Default = True Windows 64-bit (Modern) platform only. |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
Stop on first error (-jb) Stops batch compilation after the first file that causes errors. For example:
Without the -jb flag, batch compilations can continue to the next scheduled file, even after an earlier file has caused an error. |
-jb
|
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Extended error info |
The compiler generates more extended information on errors. Default = |
-Q |
Option not supported Hardcoded to C++17 |
Option not supported Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Force C++ compile |
Causes the compiler to compile all source files as C++ files, regardless of their extension. Default = |
-P |
-x c++ |
-x c++ |
-x c++ |
Instruction set (COFF only) | AVX2 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() |
AVX | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
SSE4.2 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
SSE4.1 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
SSSE3 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
SSE3 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() | |
SSE2
This is the default. |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() |
![]() | |
Instruction set |
80386 |
-3
|
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
80486 (-4) |
-4 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Pentium (-5) |
-5 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Pentium Pro (-6) Default = |
-6 | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Integer-sized enums |
Allocates a whole word (a four-byte int for 32-bit programs) for enumeration types (variables of type enum). When this option is off (-bi-), the compiler allocates the smallest integer that can hold the enumeration values: the compiler allocates an unsigned or signed char if the values of the enumeration are within the range of 0 through 255 (minimum) or -128 through 127 (maximum), or an unsigned or signed short if the values of the enumeration are within the following ranges: 0..65535 or -32768..32767. The compiler allocates a four-byte int (32-bit) to represent the enumeration values if any value is out of these ranges. Default = |
-bi |
-fshort-enums |
N/A |
N/A |
Integer-typed enums |
Enables Integer-sized enums (-bi, described above) and treats enums as ints from a typechecking point of view (relaxes typechecking for enums). Default = |
-b |
-fshort-enums |
N/A |
N/A |
Language compliance |
ANSI Use ANSI keywords and extensions. Compiles C and C++ ANSI-compatible code, allowing for maximum portability. Non-ANSI keywords are ignored as keywords. |
-A |
-fno-borland-extensions |
N/A | N/A |
GNU (-AG)Use keywords and extensions of Gcc, the GNU compiler collection, which is distributed by the Free Software Foundation at http://gcc.gnu.org/. Tells the compiler to recognize specific GNU keywords and extensions, such as __attribute__, __const, __inline__, __signed__. See GNU Attributes. |
-AG | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
K & R (-AK) Use Kernighan and Ritchie (KR) keywords and extensions. Tells the compiler to recognize only the KR extension keywords and treat any C++ extension keywords as normal identifiers. |
-AK | Option not supported
Hardcoded to C++17 |
N/A | N/A | |
Borland/CodeGear (also -A-) (-AT)* Use Borland/CodeGear/Embarcadero C++ keywords and extensions. Tells the compiler to recognize extensions to the C language keywords, including near, far, huge, asm, cdecl, pascal, interrupt, _export, _ds, _cs, _ss, _es, and the register pseudovariables ( _AX, _BX, and so on). This is the default. |
-AT | -fborland-extensions | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Unix System V (-AU) Use UNIX System V keywords and extensions. Tells the compiler to recognize only UNIX V keywords and treat any of the Borland/CodeGear/Embarcadero C++ extension keywords as normal identifiers. Tip:
If you get declaration syntax errors from your source code, check that this option is set to Borland/CodeGear .
|
-AU | Option not supported
Hardcoded to C++17 |
N/A | N/A | |
Place each data in its own section (COFF only) | Default = False
Win 64-bit (Modern) Platform only |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() |
Place each function in its own section (COFF only) | Default = False
Win 64-bit (Modern) Platform only |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
![]() |
Register variables |
None |
-r- | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Explicit (-rd) |
-rd | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Always (-r) Default = None |
-r | Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 | |
Set the maximum number of errors to emit before stopping (0 = no limit) |
To specify the number of errors to allow for the 64-bit C++ compiler, select the number in this field and type the number you want to set. Default = 1 |
Option not supported
Hardcoded to C++17 |
N/A |
-ferror-limit |
-ferror-limit |
Short enums |
Tells the 64-bit compiler to use minimally sized enums. Allocate to an enum type only as many bytes as it needs for the declared range of possible values. Default = |
Interger-sized enums option |
Interger-sized enums option |
-fshort-enums |
-fshort-enums |
Standard stack frames |
Generates a standard stack frame (standard function entry and exit code). This is helpful when debugging since it simplifies the process of stepping through the stack of called subroutines. When this option is off, any function that does not use local variables and has no parameters is compiled with abbreviated entry and return code. This makes the code smaller and faster. The Standard Stack Frame option should always be on when you compile a source file for debugging. Default = |
-k |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Option not supported
Hardcoded to C++17 |
Child Pages
- Advanced
- Compatibility
- Debugging
- Directories and Conditionals
- LSP
- Optimizations
- Output
- Precompiled Headers
- Warnings