Summary of VC compiler parameter settings

Source: Internet
Author: User
Switch all cl.exe commands

/C: retained the comment statement in the pre-processing output.
/C: Compile only, no connection, equivalent to selecting "compile" under the "build" menu"
/D: defines constants and macros, which have the same effect as # define in the source program.
/E: Pre-processes the C and C ++ source files, expands all pre-compiled commands and Macros in the source files, removes comments, and copies the output of the pre-processor to the output of the standard output device, add # Line at the beginning and end of each file
/EH: Specifies the exception handling model used by the compiler.
/EP: Same as/e, but removed # Line
/F: Set the stack size of the program.
/FA: Specifies the list file to be generated (assembly, assembly and machine code, assembly and source code, assembly and machine code, and source code)
/FA: Specifies the storage path and (or) File Name of the list file set with/FA
/FD: mutual dependency information of generated files
/FD: Set the storage path and/or file name of the program database file (PDB)
/Fe: Set the storage path and/or file name of the final Executable File
/FI: Pre-processes the specified header file, which has the same effect as # include in the source file.
/FM: create a map file
/FO: Set the storage path and (or) File Name of the compiled OBJ file
/FP: Set the storage path and/or file name of the pre-compiled file (PCH)
/FR: generate the browsing information (SBR) File
/FR: Same as/FR. The difference is that/FR does not include local variable information.
/G3: optimized code generation for the 80386 Processor
/G4: optimized code generation for the 80486 Processor
/G5: optimized code generation for the Pentium processor
/G6: optimized code generation for the Pentium Pro Processor
/GA: optimizes Windows Applications
/GB: optimized code generation for the Pentium processor. It uses a hybrid Instruction Set of 80386, 80486, Pentium, and Pentium Pro, which is the default option for code generation (processor corresponds to blend in the program property Option)
/GD: optimizes Windows dynamic library (DLL). This switch is not implemented in vc6.
/GD: Specify the function call rules using _ cdecl
/Ge: Activate stack Detection
/GF: removes repeated strings in the program and places them in the read-only buffer.
/GF: removes repeated strings in the program.
/GH: Call the hook function at the beginning of each function-penter
/GI: allow progressive Compilation
/GM: Allows minimal rebuild
/GR: Run-Time type Infomation)
/GR: Specify the function call rules using _ fastcall.
/GS: controls the memory size used for Stack Detection
/GT: supports Fier-safety for data allocated with _ declspec (thread)
/GX: Synchronous exception handling is allowed, which is equivalent to/ESCs switch.
/Gy: allows the compiler to encapsulate each function in the form of comdats for the connector to call.
/GZ: allows you to capture release build errors during debug build.
/GZ: Specify the function call rules using _ stdcall.
/H: restrict the length of external names
/Help: list all the command Switches of the Compiler
/I: Specify the search path for the header file
/J: Change the default char type from signed Char to unsigned char.
/Ld: create a dynamic Connection Library
/LDD: create a dynamic link library of the debug version.
/Link: Pass the specified option to the connector.
/MD: select the multi-threaded and dll c run-time library.
/MDD: select the multi-thread, DLL, and debug C run-time libraries.
/Ml: select the single-threaded C run-time Library
/MLD: select the single-thread and debug C run-time libraries.
/MT: select the multi-threaded C run-time Library
/MTD: select the multi-thread and debug C run-time libraries.
/Nologo: do not display the copyright information of the program
/O1: optimize to minimize the number of executable codes generated
/O2: optimized to produce the fastest executable code
/OA: indicates that no alias is used in the compiler program, which can increase the execution speed of the program.
/Ob: controls the expansion of inline functions
/OD: code optimization prohibited
/OG: Use global optimization
/OI: use internal functions to replace function calls in the program, which can make the program run faster, but the program length becomes longer.
/OP: Improves the consistency of floating point comparison operations
/OS: Generate as little executable code as possible
/OT: generate executable code as much as possible.
/Ow: indicates that the compiler does not use aliases within the function body.
/Ox: Several optimization switches are combined to achieve as many optimization as possible.
/Oy: block the creation of frame pointers in the call stack
/Q1f: generates independent debugging information for core-level device drivers.
/Qi0f: Correct the Pentium 0x0f error command
/Qifdiv: Correct the incorrect Pentium fdiv command
/P: Write the pre-processing output to the specified file. The file suffix is I.
/TC: compile all the files on the command line as the C source program, regardless of whether the suffix is. c
/TC: Compile the specified file as a C source program, regardless of whether the suffix is. C.
/TP: compile all the files on the command line as the C ++ source program, regardless of whether the suffix is. cpp
/TP: Compile the specified file as a C ++ source program, regardless of whether the suffix is. cpp.
/U: Remove a specified previously defined symbol or constant.
/U: Remove all previously defined symbols or constants.
/V: the version number is embedded in the compiled OBJ file.
/VD: Disable/allow constructor replacement
/Vmb: select the pointer representation. Use this toggle to define the class before declaring a pointer to a member of a class.
/Vmg: select the pointer representation method. With this switch, you do not need to define this class before declaring a pointer to a member of a class, however, you must first specify the Inheritance Method Used for this class.
/Vmm: Set the pointer to single inheritance and multiple inheritance.
/VMS: Set the pointer to single inheritance.
/Vmv: sets the pointer to any class.
/W: Set the warning level
/W: Disable all warnings.
/X: prevents the compiler from searching for standard include directories.
/YC: Create a pre-compiled header file (PCH)
/Yd: Write complete debugging information in all OBJ files.
/YU: Use the specified precompiled header file during the build process.
/Yx: indicates that the compiler uses the precompiled header file if it exists. If it does not exist, it creates
/Z7: Generate debugging information compatible with msc7.0
/Za: Disable Language extension (Microsoft extensions to C)
/ZD: debugging information only contains the external and global symbol information and line number information
/Ze: Allow Language extension (Microsoft extensions to C)
/ZG: generates a function prototype for each function defined in the source file.
/Zi: Generate library files (PDB) and support edit and continue debugging features
/Zi: generate a library file (PDB) that contains type information and symbol debugging information
/ZL: remove the default library file name from the OBJ file
/ZM: sets the compiler's memory allocation Xianzhi
/Zn: Disable encapsulation in the information file.
/ZP: Set the Encapsulation Format of structure members in the memory.
/Zs: Quick syntax check

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.