微軟C/C++ 編譯器選項
-優(yōu)化-
/O1 最小化空間 minimize space
/Op[-] 改善浮點數一致性 improve floating-pt consistency
/O2 最大化速度 maximize speed
/Os 優(yōu)選代碼空間 favor code space
/Oa 假設沒有別名 assume no aliasing
/Ot 優(yōu)選代碼速度 favor code speed
/Ob 內聯(lián)展開(默認 n=0) inline expansion (default n=0)
/Ow 假設交叉函數別名 assume cross-function aliasing
/Od 禁用優(yōu)化(默認值) disable optimizations (default)
/Ox 最大化選項。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
/Og 啟用全局優(yōu)化 enable global optimization
/Oy[-] 啟用框架指針省略 enable frame pointer omission
/Oi 啟用內建函數 enable intrinsic functions
-代碼生成-
/G3 為 80386 進行優(yōu)化 optimize for 80386
/G4 為 80486 進行優(yōu)化 optimize for 80486
/GR[-] 啟用 C++ RTTI enable C++ RTTI
/G5 為 Pentium 進行優(yōu)化 optimize for Pentium
/G6 為 Pentium Pro 進行優(yōu)化 optimize for Pentium Pro
/GX[-] 啟用 C++ 異常處理(與 /EHsc 相同) enable C++ EH (same as /EHsc)
/EHs 啟用同步 C++ 異常處理 enable synchronous C++ EH
/GD 為 Windows DLL 進行優(yōu)化 optimize for Windows DLL
/GB 為混合模型進行優(yōu)化(默認) optimize for blended model (default)
/EHa 啟用異步 C++ 異常處理 enable asynchronous C++ EH
/Gd __cdecl 調用約定 __cdecl calling convention
/EHc extern“C”默認為 nothrow extern "C" defaults to nothrow
/Gr __fastcall 調用約定 __fastcall calling convention
/Gi[-] 啟用增量編譯 enable incremental compilation
/Gz __stdcall 調用約定 __stdcall calling convention
/Gm[-] 啟用最小重新生成 enable minimal rebuild
/GA 為 Windows 應用程序進行優(yōu)化 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 命名可執(zhí)行文件 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 啟用調試信息的“編輯并繼續(xù)”功能 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} 禁用/啟用 vtordisp disable/enable vtordisp
/Zp[n] 在 n 字節(jié)邊界上包裝結構 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 類型是 unsigned default char type is unsigned
/nologo 取消顯示版權消息 suppress copyright message
/WX 將警告視為錯誤 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 將調試信息放在每個 .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 設置版本字符串 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 創(chuàng)建 .DLL Create .DLL
/F 設置堆棧大小 set stack size
/LDd 創(chuàng)建 .DLL 調試庫 Create .DLL debug libary
/link [鏈接器選項和庫] [linker options and libraries]
只有注冊用戶登錄后才能發(fā)表評論。 | ||
【推薦】100%開源!大型工業(yè)跨平臺軟件C++源碼提供,建模,組態(tài)!
![]() |
||
相關文章:
|
||
網站導航:
博客園
IT新聞
BlogJava
博問
Chat2DB
管理
|
||
|
| |||||||||
日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
---|---|---|---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 31 | 1 | 2 | |||
3 | 4 | 5 | 6 | 7 | 8 | 9 | |||
10 | 11 | 12 | 13 | 14 | 15 | 16 | |||
17 | 18 | 19 | 20 | 21 | 22 | 23 | |||
24 | 25 | 26 | 27 | 28 | 29 | 1 | |||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
決定開始寫工作日記,記錄一下自己的軌跡...
常用鏈接
留言簿(4)
隨筆分類(70)
隨筆檔案(71)
charles推薦訪問
搜索
積分與排名
- 積分 - 51390
- 排名 - 449
最新評論

- 1.?re: 簡單打印內存的小玩意兒
- 不錯
- --dddd
- 2.?re: 尋找最長連續(xù)遞增子序列
- 這個只能算是方法,效率太低了
- --大物
- 3.?re: 數單詞數
- 規(guī)范化;門口麻煩機;那么孔方兄那么媽媽法;釀母菌法那么;風格那么明年;憤怒麻煩那么憤怒憤怒留念多孔蕈樂觀好看的里邊趕快巴拿馬城,新年巴拿馬國際法,不
- --申訴臺
- 4.?re: 數單詞數
- 感到發(fā)現(xiàn)看來自動化大會單行本打開怎么趕快電子管矛盾感動不動門口‘大批看病黃道婆民主
- --申訴臺
- 5.?re: 移除字符
- 評論內容較長,點擊標題查看
- --D_BOY