• Keine Ergebnisse gefunden

Command-line options

Im Dokument or an (Seite 92-96)

The options listed here can be used only with the command-line compilers (BCC.EXE and BCC32.EXE). There are no direct equivalent options in the IDE; however, because you can do most of these tasks in the IDE, each option contains directions for the IDE.

-1 Generates extended 80186 instructions. It also generates 80286 programs running in real mode.

-8 Compiles towards assembly and calls TASM to assemble code. If you don't have TASM, using this option generates an error. Also, old versions of TASM might have problems with 32-bit code.

--c Compiles and assembles the named .C, .CPP, and .ASM files, but does not execute a link command. Choose Project I Compile in the IDE.

vommana-IJne options

-efilename Derives the executable program's name from filename by adding the file extension .EXE (the program name is then filename.EXE). filename must immediately follow the -e, with no intervening whitespace. Without this option, the linker derives the .EXE file's name from the name of the first source or object file in the file name list.

-Efilename Uses name as the name of the assembler to use. By default, T ASM is used. In the IDE, you can add a tool for the assembler program you want to use. See Chapter 2 for information on adding tools to the IDE.

-f87 Uses 8087 hardware instructions (16-bit DOS only).

-f287 Uses 80287 hardware instructions (16-bit DOS only). In the IDE, check Fast floating point in TargetExpert when you create a DOS target.

-Fm Enables all the other -F options (-Fc, -Ff and -Fs).You can use it as a handy shortcut when porting code from other compilers. To do this in the IDE, check the IDE options for -Fc, -Ff and -Fs.

-Fs Assumes that OS is equal to SS in all memory models. You can use this option when porting code originally written for an implementation that makes the stack part of the data segment. When you specify this optin, the compiler links in an alternate startup module (COFx.OBJ) that places the stack in the data segment. In the IDE, check Alternate Startup in the TargetExpert dialog box. This option works with DOS applications only.

-He Cache precompiled headers. Must be ~sed with -H or -Hxxx. This option is useful when compiling more than one precompiled header.

-Ix Passes option x to the linker (TLINK for BCC and TLINK32 for BCC32).

More than one option can appear after the -I (a lowercase 1). You can select linker options in the IDE by choosing Options I Project I Linker. See Chapter 9 for a list of linker options.

-I-x Suppresses linker option x. More than one option can appear after the -1-(a lowercase 1). You can check and uncheck linker options in the IDE by choosing Options I Project I Linker.

-M Forces the linker to produce a full link map. The default is to produce no link map. In the IDE, check Segment, Public, or Detailed in the Linker I Map File section of the Project Option~ dialog box.

-0 filename Compiles the named file to the specified filename.obj.

-p- Compiles files with the .CPP extension as C++ files; other files compile as C files. In the IDE, use different tools for compiling a project node. See Chapter 2 for more information.

80 Borland C++ Users Guide

vUIII"laIlU-IIII~ UfJlIUII;:)

-P Compiles all files as C++, regardless of extension. In the IDE, use different tools for compiling a project node. See Chapter 2 for more information.

-Pext Compiles all files as C++; it changes the default extension to whatever you specify with ext. This option is available because sqme programmers use .C or another extension as their default extension for C++ code. In the IDE, use different tools for compiling a project node. See Chapter 2 for more

informa tion. .

-P-ext Compiles based on the extension (.CPP for C++ code, all other file-name extensions for C code) and defines the default extension (other than .CPP).

In the IDE, use different tools for compiling a project node. See Chapter 2 for more information.

-s

Generate assembler source compiles the named source files and produces assembly language output flIes (.ASM), but does not assemble. When you use this option, Borland C++ includes the C or C++ source lines as comments in the produced .ASM file. In the IDE, use different tools for compiling a project node. Select Special I C++ to Assembler from the project window SpeedMenu. See Chapter 2 for more information.

-T string Passes string as an option to T ASM (or as an option to the assembler defined with -E).

- T- Removes all previously defined assembler options.

-to -tOe Creates a 16-bit DOS .EXE file. In the IDE, choose this target type when you create a target for your project.

-tOe Creates a 16-bit DOS .COM file. You can't create .COM files from the IDE.

-tWC -WC Creates a 32-bit console mode application. In the IDE, choose this target type when you create a target for your project.

-tWCD -WCD Creates a 32-bit console mode OLL with all functions exported. In the IDE, choose this target type when you create a target for your project.

, -tWCDE -WCDE Creates a 32-bit console mode OLL with explicit functions exported. In the IDE, choose this target type when you create a target for your project.

-tWM -WM Creates a multithread application or OLL. Use this option with -Wm and

-weD.

In the IDE, choose this target type when you create a target for your project.

-Uname Undefines any previous definitions of the named identifier name.

-Vo This option is a "master switch" that sets on all of the backward-compatibility options listed in this'section. It can be used as a handy

vUllllllcUlU-lIne opIIons

shortcut when linking with libraries built with older versions of Borland C++.

-Y Enable overlay code generation. In the IDE, choose DOS Overlay for the target type when you create a target for your project.

-Yo Overlay the compiled files. In the IDE, check Overlay this module in the node attributes dialog box for any nodes under a DOS Overlay (-Y) target.

-zx* Uses the default name for X. For example, -zA* assigns the default class name CODE to the code segment class.

82 Borland C++ Users Guide

See Chapter 5 or the online Help for reference material on

Im Dokument or an (Seite 92-96)