自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

C++編譯器命令列表總結(jié)

開發(fā) 后端
我們今天為大家總結(jié)了各種C++編譯器命令的使用方法。希望大家在通讀本文后能將其進(jìn)行收藏,以方便將來在實(shí)際編程中的應(yīng)用。

C++編程語言通過編譯器的使用可以輕松的實(shí)現(xiàn)許多功能需求。我們?cè)谶@里就會(huì)針對(duì)各種C++編譯器命令進(jìn)行一個(gè)詳細(xì)的介紹,以幫助大家能夠快速,輕松的掌握編譯器的應(yīng)用技巧。#t#

今天快要被VC6.0的編譯器給搞瘋了,按照自己的編碼速度,今天因該把驅(qū)動(dòng)通訊模塊基本通過編譯,但是沒有想到的是,VC6.0不支持最支持***驅(qū)動(dòng)框架(WDK),在網(wǎng)上找了一下午資料,都沒有能快速的方法解決,沒有辦法只好用最原始最笨的方法了-寫一個(gè)ieWraper把要調(diào)用的WDK API給包起來,然后再WDK的環(huán)境下編譯成DLL,然后在調(diào)用DLL。

對(duì)于C++編譯器命令除了幾句簡單的命令,很多都和陌生,然后查看Cl的幫助(cl/?),但是覺得這樣看非常不方便,以后每次想看的時(shí)候有得去看控制臺(tái)。于是便在MSDN上去看有沒有看得方便點(diǎn)的幫助,但是這些命令幫助都是分散開的,也覺得看其來不爽,便在google上看了一下也沒有很全的命令幫助。自己動(dòng)手豐衣足食,于是決定把命令行的控制臺(tái)命令,寫到Blog上去,1.是為了熟悉一下,2.是為了以后看方便自己,也方便大家:).

我用的編譯器是WDK上的編譯器版本號(hào)是:14.00.50727.22。

C/C++ COMPILER OPTIONS

  1. usage:cl[option...] filename... [/link linkoption] 

--C++編譯器命令之OPTIMIZATION--

  1. /O1 minimize space /O2 maximize speed  
  2. /Ob< n> inline expansion (defalut n=0
    /Od disable opimization(default)   
  3. /Og enable global optimization 
    /Oi[-]enable intrinsic functions  
  4. /Os favor code sapce /Ot favor code speed  
  5. /Ox maximum optmations /Oy[-] enable frame pointer omission 

 

--C++編譯器命令之CODE GENERATION--

 

  1. /GF enable read-only string pooling /Gm[-]enable minimal rebuild  
  2. /Gy[-] separate functions for linker /GS[-]enable security checks  
  3. /GR[-]enable C++ RTTI /GX[-]enalbe C++ EH(same as /EHsc)  
  4. /EHs enable C++ EH(no SEH exceptions) 
    /EHa enable C++ EH(w/SEH exceptions)  
  5. /fp:< except[-]|fast|precise|strict> choose floating-point model:  
  6. except[-]-consider floating-point exceptions when generating code   
  7. fast-"fast" floating-point model;results are less predictable  
  8. precise-"precise" floating-point model;result are predictable  
  9. strict-"strict" floating-point model(implies/fp:except)  
  10. /GL[-] enable link-time code generation 
    /GA optimize for windows application  
  11. /Ge force stack check for all funcs 
    /Gs[num] control stack checkings calls  
  12. /Gh enable _penter function call /GH enable _pexit function call  
  13. /GT generate filber-safe TLS accesses 
    /RTC1 Enable fast checks(/RTCsu)  
  14. /RTCc convert to small type checks /RTCs stack Frame runtime checking  
  15. /RTCu uninitialized local usage checks  
  16. /clr[:opt] compile for common language runtime,where option is:  
  17. pure - produce IL-only output file(no native executable code)  
  18. safe - prdouce IL-only verifiable output file  
  19. oldsyntax - accept the Managed Extensions syntax 
    from Visual C++ 2000/2003   
  20. initialAppDomain - enable inital AppDomain behavior of Visual C++ 2002  
  21. noAssembly - do not produce an assembly  
  22. /Gd __cdecl calling convertion /Gr __fastcall calling convertion  
  23. /Gz __stdcall calling convertion /GZ Enable stack checks(RTCs)  
  24. /Qifist[-] use FIST instead of ftol()  
  25. /hotpatch ensure function padding for htpatchable images  
  26. /arch:< SSE|SE2> minimum CPU architecture requirements,one of:  
  27. SSE - enable use of instructions available with SSE enabled CPUS  
  28. SSE2 - enable use off instructions available with SSE2 enabled CPUS  
  29. -OUTPUT FILES-  
  30. /Fa[file] name assembly listing file /FA[scu] configure assembly listing  
  31. /Fd[file] name .PDB file /Fe< file> name executable file  
  32. /Fm[file] name map file /Fo< file> name object file  
  33. /Fp< file> name precompiled header file /Fr[file] name source browser file  
  34. /FR[file] name extended .SBR file  
  35. /doc[file] process XML documentation comments 
    and optionally name the .xdc file 

 

--C++編譯器命令之PREPROCESSOR--

  1. /AI< dir> add to assembly search path 
    /FU
    < file> forced using assembly/model  
  2. /C don't strip coments /D< name>{=|#}< ext> define macro  
  3. /E preprocess to stdout /EP preprocess to stdout,no#line  
  4. /P precprocess to file /Fx merge injected code to file  
  5. /FI< file> name forced include file /U< name> remove predefined macor  
  6. /u remove all predefined macors /I< dir> add to include search pth  
  7. /X ignore "standard places" 

 

--C++編譯器命令之LANGUAGE--

  1. /Zi enable debugging information /Z7 enable old-style debug info  
  2. /Zp[n] pack structs on n-byte boundary /Za disable extensions  
  3. /Ze enable extenstions(defalut) /Zl omit default library name in .OBJ  
  4. /Zg generate function prototypes /Zs syntax check only  
  5. /vd{0|1|2} disable/enable vtordisp /vm< x> type of pointers to members  
  6. /Zc:arg1[,arg2] C++ lanuage confomance,where arguments can be:  
  7. forScope[-] - enforce Stand C++ for scoping rules  
  8. wchar_t[-] - wchar_t is the native type,not a typedef  
  9. /ZI enable Edit and Continue debug info  
  10. /openmp enable OpenMP 2.0 language extensions 

 

--C++編譯器命令之MISCELLANEOUS--

 

  1. @< FILE> Options response file /?,/help print this help message  
  2. /bigobj generate extended object format /c compile only,no link  
  3. /errorReport:option Report internal compiler errors to Microsoft  
  4. none - do not send report  
  5. prompt - prompt to immediately send report  
  6. queue - at next admin logon ,prompt to send report (default)  
  7. send - send report automatically  
  8. /FC use fall pathnames in diagnostcs /H< num> max external name lenght  
  9. /J default char type is unsigned /nologo suppress copyright message  
  10. /showInclude show include file names /TC compile all files as .c  
  11. /Tp< source file> compile file as .cpp /TC compile all file as .c  
  12. /TP compile all files as .cpp /V< string> set version string  
  13. /w disable all warnings /wd< n> disable warning n  
  14. /we< n> treat warning n as an error /wo< n> issue warning n once  
  15. /w< l>< n> set warning level 1-4 for n /W< n> 
    set warning level(defalut 
    n =1)  
  16. /Wall enable all warnings /WL enable one line diagnostics  
  17. /WX treat warning as errors /Yc[file] create .PCH file  
  18. /Yd put debug info in every .OBJ /Yl[sym] inject .PCH ref for debug lib  
  19. /Yu[file] use .PCH file /Y- disable all PCH options  
  20. /Zm< n> max memory alloc(% of defalut) /Wp64 enable 64 bit porting warnings 

 

--C++編譯器命令之LINKING--

  1. /LD Create .DLL /LDd Create .Dll debug library  
  2. /LN Create a .netmodule /F[num] set stack size  
  3. /link [linker options and libraries] /MD link with MSVCRT.LIB  
  4. /MT link with LIBCMT.LIB /MDd link with MSVCRTD.LIB deubg lib  
  5. /MTd link with LIBCMTD.LIB debug lib 

以上就是對(duì)C++編譯器命令的相關(guān)總結(jié)。

責(zé)任編輯:曹凱 來源: 博客園
相關(guān)推薦

2010-01-18 10:34:21

C++編譯器

2010-01-21 09:11:38

C++編譯器

2015-03-23 10:04:43

c++編譯器c++實(shí)現(xiàn)原理總結(jié)

2010-01-18 10:28:15

C++編譯器

2010-10-20 13:43:37

C++編譯器

2010-01-14 15:29:44

C++編譯器

2010-01-12 16:42:59

C++編譯器

2010-01-21 09:26:53

CC++編譯器

2010-01-27 16:39:48

C++編譯器

2009-01-12 10:16:11

Visual C++編譯器選項(xiàng)設(shè)置

2010-01-14 14:55:14

C++編譯器

2010-01-27 14:48:55

優(yōu)秀C++編譯器

2010-01-08 16:00:46

C++編譯器

2012-02-09 09:14:32

C++

2010-01-13 17:12:26

C++編譯器

2010-01-22 18:33:17

C++編譯器

2010-01-15 16:37:28

Visual C++

2013-03-18 09:42:47

C++C++ 11

2023-11-15 17:58:58

C++代碼

2010-01-13 13:42:55

C++編譯器
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)