-Optimization-/o1 minimized space minimize space/op[-] improved floating point consistency improve floating-pt consistency/o2 maximize speed maximize Speed/os preferred code space favor Code SPACE/OA assumes that there is no alias assume no aliasing/ot preferred code speed favor codes speed/ob inline expansion (default n=0) inline expansion (defaults n=0)/ow Assume that the crossover function alias assume cross-function aliasing/od disables the optimization (default) Disable optimizations maximize option. (/OGITYB2/GS) Maximum opts. (/OGITYB1/GS)/og enable the global optimization enabled optimization/oy[-] enable frame pointer omit the Allow frame pointer omission/oi enable built-in functions Enabl E intrinsic functions-code generation-/G3 for 80386 optimization optimize for 80386/g4 80486 optimization optimize for 80486/gr[-] enable C + + RT TI Enable C + + rtti/g5 for Pentium optimization optimize for pentium/g6 Pentium Pro optimized optimize for Pentium pro/gx[-] enabled C + + exception handling (same as/EHSC) enable C + + EH (same AS/EHSC)/EHs enabling synchronous C + + exception handling enables synchronous C + + EH/GD to optimize for Windows DLLs Optimize for Windows DLL/GB optimized for mixed models (default) optimize for blended model (defaults)/EHa enable asynchronous C + + exception handling enabling asynchronous C + + eh/gd __cDecl calling convention __cdecl calling CONVENTION/EHC extern "C" defaults to nothrow extern ' C ' defaults to NOTHROW/GR __fastcall calling convention __ Fastcall calling convention/gi[-] enabling incremental compilation enable incremental compilation/gz __stdcall calling convention __stdcall calling convention /gm[-] Enabling minimal rebuild enable minimal rebuild/ga optimized for Windows applications optimize for Windows APPLICATION/GF enable string pooling enabling St Ring pooling/qifdiv[-] Enables Pentium FDIV repair enable Pentium FDIV FIX/GF enable read-only string pooling enabling Read-only string Pooling/qi 0f[-] Enabling Pentium 0x0f repair enable Pentium 0x0f FIX/GY separate linker functions separate functions for LINKER/GZ enable run-time debug check enables Runti Me debug Checks/gh enable hook function call enabled hook functions call/ge force stack Check on all functions checking for all Funcs/gs[num] disable stack Check call disable stack checking calls-output file-/fa[file] name the assembly list file name assembly listing file/fo name object file name FA[SC] Configure the Assembly list Configure assembly LISTING/FP name the precompiled header file name Precompiled header File/fd[file] named. PDB file name. PDB File/fr[file] naming Source Browser textPiece name Source browser file/fe name executable name executable file/fr[file] name extension. SBR file name extended. SBR File/fm[file] Name Mapping file name map file-language-/zi enable debug information enables debugging Information/zl ignore. The default library name in OBJ is omit in. Obj/zi the Edit and continue function enabling debug information enable Edit and Continue debug INFO/ZG generate function prototypes generate functions prototypes/z7 enable legacy Debugging information ENA BLE old-style debug Info/zs only for syntax checking syntax check ONLY/ZD only line number debug information lines numbers debugging info only/vd{0|1} disable/enable VT Ordisp disable/enable Vtordisp/zp[n] Wrapper structure pack on N-byte bounds structs on N-byte boundary/vm pointer to member type ' of pointers to Members/za Disabling extensions (alluding to/op) disable extensions (IMPLIES/OP)/nobool Disabling the "bool" keyword disable "bool" keyword/ze enable extension (default) E Nable Extensions (default)-miscellaneous-/?,/help prints this help message print this helps message/c only compile, not link compile only, no link/w set warning, etc. Class (default n=1) Set warning level (defaults n=1)/h maximizes external name length max external name length/j default char type is unsigned-default char Type is Unsigned/nologo Suppress a copyright message suppress MESSAGE/WX treats the warning as an error treat warnings as ERRORS/TC compiles the file as. C compile files as. C/yc[file] Create. PCH file Create. PCH FILE/TP compiles the files to. cpp compile file as. cpp/yd put debug information on each. In OBJ, put debug info in every. OBJ/TC compiles all files into. C Compile all file as. C/TP compiles all the files into. cpp compile all file as. Cpp/yu[file] use. PCH file use. PCH file/v Sets the version string set to String/yx[file] automatic. PCH file Automatic. pch/w Disable all warnings Disable all WARNINGS/ZM maximum memory allocation (default =%) Max Memories Alloc (% of default)-links-/MD and MSVCRT. LIB link with MSVCRT. LIB/MDD and MSVCRTD. The LIB debug library links link with MSVCRTD. LIB Debug Lib/ml and LIBC. LIB link with LIBC. Lib/mld and LIBCD. The LIB debug library links link with LIBCD. LIB Debug LIB/MT and LIBCMT. LIB link with LIBCMT. LIB/MTD and LIBCMTD. The LIB debug library links link with LIBCMTD. LIB Debug Lib/ld created. DLL Create. dll/f sets the stack size set size/ldd created. DLL Debug Library Create. DLL debug Libary/link [linker options and libraries] [linker options and libraries]
View Code
-Preprocessor- /FI name mandatory include file name forced include file/c do not draw comments don ' t strip comments/ u remove predefined macros remove predefined macro/d{=|#} define macro define macro/u Remove all predefined macros remove all predefined macros/e< c13/> directs preprocessing to standard output preprocess to stdout/i the search path added to the include file add to include search Path/ep direct preprocessing to standard output without line number Preprocess to stdout, no #line/x ignores "standard location" ignore "standardized places"/p preprocessing to file preprocess
For example, setting the/P compilation option will only explain the macros to the file, which is located in the appropriate file. I file in the project root directory.
VC + + Compilation options