微軟C/C++ 編譯器選項(xiàng)
-優(yōu)化-
/O1 最小化空間 minimize space
/Op[-] 改善浮點(diǎn)數(shù)一致性 improve floating-pt consistency
/O2 最大化速度 maximize speed
/Os 優(yōu)選代碼空間 favor code space
/Oa 假設(shè)沒有別名 assume no aliasing
/Ot 優(yōu)選代碼速度 favor code speed
/Ob 內(nèi)聯(lián)展開(默認(rèn) n=0) inline expansion (default n=0)
/Ow 假設(shè)交叉函數(shù)別名 assume cross-function aliasing
/Od 禁用優(yōu)化(默認(rèn)值) disable optimizations (default)
/Ox 最大化選項(xiàng)。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
/Og 啟用全局優(yōu)化 enable global optimization
/Oy[-] 啟用框架指針省略 enable frame pointer omission
/Oi 啟用內(nèi)建函數(shù) enable intrinsic functions
-代碼生成-
/G3 為 80386 進(jìn)行優(yōu)化 optimize for 80386
/G4 為 80486 進(jìn)行優(yōu)化 optimize for 80486
/GR[-] 啟用 C++ RTTI enable C++ RTTI
/G5 為 Pentium 進(jìn)行優(yōu)化 optimize for Pentium
/G6 為 Pentium Pro 進(jìn)行優(yōu)化 optimize for Pentium Pro
/GX[-] 啟用 C++ 異常處理(與 /EHsc 相同) enable C++ EH (same as /EHsc)
/EHs 啟用同步 C++ 異常處理 enable synchronous C++ EH
/GD 為 Windows DLL 進(jìn)行優(yōu)化 optimize for Windows DLL
/GB 為混合模型進(jìn)行優(yōu)化(默認(rèn)) optimize for blended model (default)
/EHa 啟用異步 C++ 異常處理 enable asynchronous C++ EH
/Gd __cdecl 調(diào)用約定 __cdecl calling convention
/EHc extern“C”默認(rèn)為 nothrow extern "C" defaults to nothrow
/Gr __fastcall 調(diào)用約定 __fastcall calling convention
/Gi[-] 啟用增量編譯 enable incremental compilation
/Gz __stdcall 調(diào)用約定 __stdcall calling convention
/Gm[-] 啟用最小重新生成 enable minimal rebuild
/GA 為 Windows 應(yīng)用程序進(jìn)行優(yōu)化 optimize for Windows Application
/Gf 啟用字符串池 enable string pooling
/QIfdiv[-] 啟用 Pentium FDIV 修復(fù) enable Pentium FDIV fix
/GF 啟用只讀字符串池 enable read-only string pooling
/QI0f[-] 啟用 Pentium 0x0f 修復(fù) enable Pentium 0x0f fix
/Gy 分隔鏈接器函數(shù) separate functions for linker
/GZ 啟用運(yùn)行時(shí)調(diào)試檢查 enable runtime debug checks
/Gh 啟用鉤子函數(shù)調(diào)用 enable hook function call
/Ge 對(duì)所有函數(shù)強(qiáng)制堆棧檢查 force stack checking for all funcs
/Gs[num] 禁用堆棧檢查調(diào)用 disable stack checking calls
-輸出文件-
/Fa[file] 命名程序集列表文件 name assembly listing file
/Fo 命名對(duì)象文件 name object file
/FA[sc] 配置程序集列表 configure assembly listing
/Fp 命名預(yù)編譯頭文件 name precompiled header file
/Fd[file] 命名 .PDB 文件 name .PDB file
/Fr[file] 命名源瀏覽器文件 name source browser file
/Fe 命名可執(zhí)行文件 name executable file
/FR[file] 命名擴(kuò)展 .SBR 文件 name extended .SBR file
/Fm[file] 命名映射文件 name map file
-預(yù)處理器-
/FI 命名強(qiáng)制包含文件 name forced include file
/C 不吸取注釋 don't strip comments
/U 移除預(yù)定義宏 remove predefined macro
/D{=|#} 定義宏 define macro
/u 移除所有預(yù)定義宏 remove all predefined macros
/E 將預(yù)處理定向到標(biāo)準(zhǔn)輸出 preprocess to stdout
/I 添加到包含文件的搜索路徑 add to include search path
/EP 將預(yù)處理定向到標(biāo)準(zhǔn)輸出,不要帶行號(hào) preprocess to stdout, no #line
/X 忽略“標(biāo)準(zhǔn)位置” ignore "standard places"
/P 預(yù)處理到文件 preprocess to file
-語言-
/Zi 啟用調(diào)試信息 enable debugging information
/Zl 忽略 .OBJ 中的默認(rèn)庫名 omit default library name in .OBJ
/ZI 啟用調(diào)試信息的“編輯并繼續(xù)”功能 enable Edit and Continue debug info
/Zg 生成函數(shù)原型 generate function prototypes
/Z7 啟用舊式調(diào)試信息 enable old-style debug info
/Zs 只進(jìn)行語法檢查 syntax check only
/Zd 僅要行號(hào)調(diào)試信息 line number debugging info only
/vd{0|1} 禁用/啟用 vtordisp disable/enable vtordisp
/Zp[n] 在 n 字節(jié)邊界上包裝結(jié)構(gòu) pack structs on n-byte boundary
/vm 指向成員的指針類型 type of pointers to members
/Za 禁用擴(kuò)展(暗指 /Op) disable extensions (implies /Op)
/noBool 禁用“bool”關(guān)鍵字 disable "bool" keyword
/Ze 啟用擴(kuò)展(默認(rèn)) enable extensions (default)
- 雜項(xiàng) -
/?, /help 打印此幫助消息 print this help message
/c 只編譯,不鏈接 compile only, no link
/W 設(shè)置警告等級(jí)(默認(rèn) n=1) set warning level (default n=1)
/H 最大化外部名稱長度 max external name length
/J 默認(rèn) char 類型是 unsigned default char type is unsigned
/nologo 取消顯示版權(quán)消息 suppress copyright message
/WX 將警告視為錯(cuò)誤 treat warnings as errors
/Tc 將文件編譯為 .c compile file as .c
/Yc[file] 創(chuàng)建 .PCH 文件 create .PCH file
/Tp 將文件編譯為 .cpp compile file as .cpp
/Yd 將調(diào)試信息放在每個(gè) .OBJ 中 put debug info in every .OBJ
/TC 將所有文件編譯為 .c compile all files as .c
/TP 將所有文件編譯為 .cpp compile all files as .cpp
/Yu[file] 使用 .PCH 文件 use .PCH file
/V 設(shè)置版本字符串 set version string
/YX[file] 自動(dòng)的 .PCH 文件 automatic .PCH
/w 禁用所有警告 disable all warnings
/Zm 最大內(nèi)存分配(默認(rèn)為 %) max memory alloc (% of default)
-鏈接-
/MD 與 MSVCRT.LIB 鏈接 link with MSVCRT.LIB
/MDd 與 MSVCRTD.LIB 調(diào)試庫鏈接 link with MSVCRTD.LIB debug lib
/ML 與 LIBC.LIB 鏈接 link with LIBC.LIB
/MLd 與 LIBCD.LIB 調(diào)試庫鏈接 link with LIBCD.LIB debug lib
/MT 與 LIBCMT.LIB 鏈接 link with LIBCMT.LIB
/MTd 與 LIBCMTD.LIB 調(diào)試庫鏈接 link with LIBCMTD.LIB debug lib
/LD 創(chuàng)建 .DLL Create .DLL
/F 設(shè)置堆棧大小 set stack size
/LDd 創(chuàng)建 .DLL 調(diào)試庫 Create .DLL debug libary
/link [鏈接器選項(xiàng)和庫] [linker options and libraries]
posted on 2007-07-17 23:16
Charles 閱讀(1029)
評(píng)論(0) 編輯 收藏 引用 所屬分類:
拿來主義