VC compilation switch parameters

Source: Internet
Author: User

You can use settings --> project --> C/C ++ --> customize to set this compilation switch.


VC compilation command switch

/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, and Program # Define in has the same effect
/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 for 80386 Processors Code Generate
/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
--------------------------
File Types supported by VC

DSW: The full name is developer studio workspace, the highest level configuration file, which records the configuration information of the entire workspace. It is a plain text file that is automatically generated when Vc creates a new project.
DSP: The full name is developer studio project, which is also a configuration file, but it records all the configuration information of a project, a plain text file
OPT: the configuration file used in combination with DSW and DSP. It records information related to machine hardware. The opt file content of the same project on different machines is different.
CLW: records information related to classwizard. If the CLW file is lost, there is no class information in the Class View panel.
PLG: it is actually a hypertext file that can be opened using Internet Explorer. It records the build process and is a log file.
RC: The resource description file records all resource information. modifications made in the resource editor are actually modifications made to the RC file.
RC2: The attached Resource Description file. It cannot be directly modified in the resource editor. It can only be manually added and can be used to add additional resources.
Res: resource files compiled by the resource editor are stored in binary format.
SBR: the browser information file generated by the compiler, which is very useful in code navigation. She needs to specify the/FR or/FR switch during compilation.
BSc: BSCMAKE. EXE uses all the SBR files as input. After processing, a bsc file is output. The BSC file is actually used in code navigation.
ILK: When the incremental compilation connection is selected, the connector automatically generates the ilk file to record the connection information.
PDB: The full name is program database, which is a program database file used to record debugging information. It is a very important file. Without it, the program cannot be properly debugged.
Lib: if the project output is DLL, a lib file with the same name as the project is usually output to record the output function information.
Exp: Same as Lib, which is an output file generated together with DLL
PCH: The full name is precompiled header, which is a pre-compiled header file. It is automatically generated by the compiler when the/YU switch is specified during compilation.

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.