VC編譯優化設置
VC- Project Setting-Debug-Project Option語法解釋
-優化-?
/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++ RTTI? enable 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?
/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 應用程序進行優化 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}? 禁用/啟用 vtordisp? disable/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 類型是 unsigned? default char type is unsigned
/nologo? 取消顯示版權消息? suppress copyright message
/WX? 將警告視為錯誤? treat warnings as errors
/Tc? 將文件編譯為 .c? compile file as .c?
/Yc[file]? 創建 .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? 創建 .DLL? Create .DLL?
/F? 設置堆棧大小? set stack size
/LDd? 創建 .DLL 調試庫? Create .DLL debug libary
/link? [鏈接器選項和庫]? [linker options and libraries]
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
