微软C/C++ 编译器选项

来源:互联网 发布:设计动画人物的软件 编辑:程序博客网 时间:2024/05/16 05:47
微软C/C++ 编译器选项-优化-/O1最小化空间minimize space/Op[-]改善浮点数一致性improve floating-pt consistency/O2最大化速度maximize speed/Os优选代码空间favor code space/Oa假设没有别名assume no aliasing/Ot优选代码速度favor code speed/Ob内联展开(默认 n=0)inline expansion (default n=0)/Ow假设交叉函数别名assume cross-function aliasing/Od禁用优化(默认值)disable optimizations (default)/Ox最大化选项。(/Ogityb2 /Gs)maximum opts. (/Ogityb1 /Gs)/Og启用全局优化enable global optimization/Oy[-]启用框架指针省略enable frame pointer omission/Oi启用内建函数enable intrinsic functions-代码生成- /G3为 80386 进行优化optimize for 80386/G4为 80486 进行优化optimize for 80486/GR[-]启用 C++ RTTIenable C++ RTTI/G5为 Pentium 进行优化optimize for Pentium/G6为 Pentium Pro 进行优化optimize for Pentium Pro/GX[-]启用 C++ 异常处理(与 /EHsc 相同)enable C++ EH (same as /EHsc)/EHs启用同步 C++ 异常处理enable synchronous C++ EH/GD为 Windows DLL 进行优化optimize for Windows DLL/GB为混合模型进行优化(默认)optimize for blended model (default)/EHa启用异步 C++ 异常处理enable asynchronous C++ EH/Gd__cdecl 调用约定__cdecl calling convention/EHcextern“C”默认为 nothrowextern "C" defaults to nothrow/Gr__fastcall 调用约定__fastcall calling convention/Gi[-]启用增量编译enable incremental compilation/Gz__stdcall 调用约定__stdcall calling convention/Gm[-]启用最小重新生成enable minimal rebuild/GA为 Windows 应用程序进行优化optimize for Windows Application/Gf启用字符串池enable string pooling/QIfdiv[-]启用 Pentium FDIV 修复enable Pentium FDIV fix/GF启用只读字符串池enable read-only string pooling/QI0f[-]启用 Pentium 0x0f 修复enable Pentium 0x0f fix/Gy分隔链接器函数separate functions for linker/GZ启用运行时调试检查enable runtime debug checks/Gh启用钩子函数调用enable hook function call/Ge对所有函数强制堆栈检查force stack checking for all funcs/Gs[num]禁用堆栈检查调用disable stack checking calls-输出文件- /Fa[file]命名程序集列表文件name assembly listing file/Fo命名对象文件name object file/FA[sc]配置程序集列表configure assembly listing/Fp命名预编译头文件name precompiled header file/Fd[file]命名 .PDB 文件name .PDB file/Fr[file]命名源浏览器文件name source browser file/Fe命名可执行文件name executable file/FR[file]命名扩展 .SBR 文件name extended .SBR file/Fm[file]命名映射文件name map file-预处理器- /FI命名强制包含文件name forced include file/C不吸取注释don't strip comments/U移除预定义宏remove predefined macro/D{=|#}定义宏define macro/u移除所有预定义宏remove all predefined macros/E将预处理定向到标准输出preprocess to stdout/I添加到包含文件的搜索路径add to include search path/EP将预处理定向到标准输出,不要带行号preprocess to stdout, no #line/X忽略“标准位置”ignore "standard places"/P预处理到文件preprocess to file-语言- /Zi启用调试信息enable debugging information/Zl忽略 .OBJ 中的默认库名omit default library name in .OBJ/ZI启用调试信息的“编辑并继续”功能enable Edit and Continue debug info/Zg生成函数原型generate function prototypes/Z7启用旧式调试信息enable old-style debug info/Zs只进行语法检查syntax check only/Zd仅要行号调试信息line number debugging info only/vd{0|1}禁用/启用 vtordispdisable/enable vtordisp/Zp[n]在 n 字节边界上包装结构pack structs on n-byte boundary/vm指向成员的指针类型type of pointers to members/Za禁用扩展(暗指 /Op)disable extensions (implies /Op)/noBool禁用“bool”关键字disable "bool" keyword/Ze启用扩展(默认)enable extensions (default)- 杂项 - /?, /help打印此帮助消息print this help message/c只编译,不链接compile only, no link/W设置警告等级(默认 n=1)set warning level (default n=1)/H最大化外部名称长度max external name length/J默认 char 类型是 unsigneddefault char type is unsigned/nologo取消显示版权消息suppress copyright message/WX将警告视为错误treat warnings as errors/Tc将文件编译为 .ccompile file as .c/Yc[file]创建 .PCH 文件create .PCH file/Tp将文件编译为 .cppcompile file as .cpp/Yd将调试信息放在每个 .OBJ 中put debug info in every .OBJ/TC将所有文件编译为 .ccompile all files as .c/TP将所有文件编译为 .cppcompile all files as .cpp/Yu[file]使用 .PCH 文件use .PCH file/V设置版本字符串set version string/YX[file]自动的 .PCH 文件automatic .PCH/w禁用所有警告disable all warnings/Zm最大内存分配(默认为 %)max memory alloc (% of default)-链接- /MD与 MSVCRT.LIB 链接link with MSVCRT.LIB/MDd与 MSVCRTD.LIB 调试库链接link with MSVCRTD.LIB debug lib/ML与 LIBC.LIB 链接link with LIBC.LIB/MLd与 LIBCD.LIB 调试库链接link with LIBCD.LIB debug lib/MT与 LIBCMT.LIB 链接link with LIBCMT.LIB/MTd与 LIBCMTD.LIB 调试库链接link with LIBCMTD.LIB debug lib/LD创建 .DLLCreate .DLL/F设置堆栈大小set stack size/LDd创建 .DLL 调试库Create .DLL debug libary/link[链接器选项和库][linker options and libraries]
原创粉丝点击