ProjectOptions
C++ Compiler
Advanced
Use this dialog box to set C++ Compiler Advanced Compilation options.
Build Configuration options |
Description |
Build Configuration |
Displays the name of the current build configuration associated with the options on this page. There are three default build configurations: Base, Debug, and Release. |
Apply Options... |
Displays the Apply Option Set dialog box to apply the options in a named option set to the current configuration. |
Common items |
Description |
Value from <parent configuration or option set> |
Indicates the value in the parent build configuration or referenced option set. If you change this value here, the change will potentially affect the Base configuration (that is, if you click OK on the Project->Options dialog and subsequently build your project). |
Inherit |
Indicates whether inheritance (from a parent configuration) is on or off for the option. To control inheritance, click the option, and then open the associated generic list dialog box by clicking the ![]() |
<any item in red print> |
Indicates that this option has secondary options available. To view the secondary options, click the + sign in front of the option in red. |
<any item in boldface print> |
Indicates that the value of this option has been changed from the value in the parent configuration or referenced option set. |
![]() |
Appears after you click an option that has a set of available choices (such as True, False). Click ![]() |
![]() |
Appears after you click an option whose value is either of the following:
|
Assembler Options |
Description |
Assembler options |
Enter any additional assembler options (such as -TX or -T) that you want for the current project. Passes the specified option(s) to the assembler that you specify with the -E option. |
Compile to .ASM (-S), then assemble to .OBJ (-B) |
Causes the compiler to first generate an .ASM file from your C++ (or C) source code (same as the -S command-line option). The compiler then calls TASM32 (or the assembler specified with the -E option) to create an .OBJ file from the .ASM file. The .ASM file is then deleted. Your program will fail to compile with the -B option if your C or C++ source code declares static global variables that are keywords in assembly. This is because the compiler does not precede static global variables with an underscore (as it does other variables), and the assembly keywords will generate errors when the code is assembled. Default = False |
Compile to assembly (-S) |
Causes the compiler to generate an .ASM file from your C++ (or C) source code. Default = False |
Specify which assembler to use (-E) |
Assemble instructions using the specified filename as the assembler. The 32-bit compiler uses TASM32 as the default assembler. See the description of the ![]() |
Floating point options |
Description |
Correct FDIV flaw (-fp) |
Some early Pentium chips do not perform specific floating-point division calculations with full precision. Although chances of encountering this problem are slim, this switch inserts code that emulates floating-point division, so that you are assured of the correct result. This option decreases your program's FDIV instruction performance. Use of this option only corrects FDIV instructions in modules that you compile. The runtime library also contains FDIV instructions that are not modified by setting this switch. To correct the runtime libraries, you must recompile them using this switch. The following functions use FDIV instructions in assembly language that are not corrected if you use this option: acos, acosl, acos, asinasinl, atanatan2, atan2latanl, coscosh, coshlcosl, expexpl, fmodfmodl, powpow10, pow10lpowl, sinsinh, sinhlsinl, tantanh, tanhltanl In addition, this switch does not correct functions that convert a floating-point number to or from a string (such as printf or scanf). Default = False |
Fast floating point (-ff) |
Floating-point operations are optimized without regard to explicit or implicit type conversions. Calculations can be faster than under ANSI operating mode. The purpose of the fast floating-point option is to allow certain optimizations that are technically contrary to correct C semantics. double x; x = (float) (3.5*x); To execute this correctly, x is multiplied by 3.5 to give a double that is truncated to float precision, then stores as a double in x. Under fast floating-point operation, the long double product is converted directly to a double. Since very few programs depend on the loss of precision on passing to a narrower floating-point type, fast floating point is on by default. When this option is disabled (-ff-), the compiler follows strict ANSI rules regarding floating-point conversions. Default = True |
Quiet floating point compares (-fq) |
Use the quiet floating point instruction (FUCOMP). Default = True |
Other options |
Description |
Additional options to pass to the compiler |
Enter any additional compiler options that you want to add for the current project. |
Code page (-CP) |
Enables support for user-defined code pages. Its primary use is to tell the compiler how to parse and convert multi-byte character strings (MBCS). There are two distinct areas where code pages come into effect:
For MBCS strings belonging to the second set (wide-char string constants), specify the correct code page to convert the MBCS strings to Unicode strings using the Windows API function MultiByteToWideChar. Syntax Enable code paging with the following command-line switch: -CPnnnn In this syntax, nnnn is the decimal value of the code page you need to use for your specific locale. The following rules apply:
See the description of the ![]() |
Unsigned char type (-K) |
The compiler treats char declarations as if they were unsigned char type, which provides compatibility with other compilers. Default = False |
Source options |
Description |
Enable nested comments (-C) |
Nests comments in your C and C++ source files. Nested comments are not allowed in standard C implementations, and they are not portable. Default = False |
Identifier length (-i) |
Specifies the number of significant characters (those which are recognized by the compiler) in an identifier. Except in C++, which recognizes identifiers of unlimited length, all identifiers are treated as distinct only if their significant characters are distinct. This includes variables, preprocessor macro names, and structure member names. Valid numbers for length are 0, and 8 to 250, where 0 means use the maximum identifier length of 250. By default, C++Builder uses 250 characters per identifier. Other systems (including some UNIX compilers) ignore characters beyond the first eight. If you are porting to other environments, you might want to compile your code with a smaller number of significant characters, which helps you locate name conflicts in long identifiers that have been truncated. Default = 250 |
Strings options |
Description |
Merge duplicate strings (-d) |
Merges two literal strings when one matches another. This produces smaller programs (at the expense of a slightly longer compile time), but can introduce errors if you modify one string. Default = False |
Read-only strings (-dc) |
Put memory allocated for strings into the read-only data segment. Default = False |
Writable strings (-dw) |
Put memory allocated for strings into the writable data segment. Default = False |
General option |
Description |
Default |
Saves the current settings as the default for each new project. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|