大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这篇文章给大家分享的是有关C++编译器命令有哪些的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
成都创新互联专注于企业全网整合营销推广、网站重做改版、蒲城网站定制设计、自适应品牌网站建设、成都h5网站建设、购物商城网站建设、集团公司官网建设、成都外贸网站制作、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为蒲城等各大城市提供网站开发制作服务。
快要被VC6.0的编译器给搞疯了,按照自己的编码速度,今天因该把驱动通讯模块基本通过编译,但是没有想到的是,VC6.0不支持最支持***驱动框架(WDK),在网上找了一下午资料,都没有能快速的方法解决,没有办法只好用最原始最笨的方法了-写一个ieWraper把要调用的WDK API给包起来,然后再WDK的环境下编译成DLL,然后在调用DLL。
对于C++编译器命令除了几句简单的命令,很多都和陌生,然后查看Cl的帮助(cl/?),但是觉得这样看非常不方便,以后每次想看的时候有得去看控制台。于是便在MSDN上去看有没有看得方便点的帮助,但是这些命令帮助都是分散开的,也觉得看其来不爽,便在google上看了一下也没有很全的命令帮助。自己动手丰衣足食,于是决定把命令行的控制台命令,写到Blog上去,1.是为了熟悉一下,2.是为了以后看方便自己,也方便大家:).
我用的编译器是WDK上的编译器版本号是:14.00.50727.22。
C/C++ COMPILER OPTIONS
usage:cl[option...] filename... [/link linkoption]
--C++编译器命令之OPTIMIZATION--
/O1 minimize space /O2 maximize speed
/Ob< n> inline expansion (defalut n=0)
/Od disable opimization(default)/Og enable global optimization
/Oi[-]enable intrinsic functions/Os favor code sapce /Ot favor code speed
/Ox maximum optmations /Oy[-] enable frame pointer omission
--C++编译器命令之CODE GENERATION--
/GF enable read-only string pooling /Gm[-]enable minimal rebuild
/Gy[-] separate functions for linker /GS[-]enable security checks
/GR[-]enable C++ RTTI /GX[-]enalbe C++ EH(same as /EHsc)
/EHs enable C++ EH(no SEH exceptions)
/EHa enable C++ EH(w/SEH exceptions)/fp:< except[-]|fast|precise|strict> choose floating-point model:
except[-]-consider floating-point exceptions when generating code
fast-"fast" floating-point model;results are less predictable
precise-"precise" floating-point model;result are predictable
strict-"strict" floating-point model(implies/fp:except)
/GL[-] enable link-time code generation
/GA optimize for windows application/Ge force stack check for all funcs
/Gs[num] control stack checkings calls/Gh enable _penter function call /GH enable _pexit function call
/GT generate filber-safe TLS accesses
/RTC1 Enable fast checks(/RTCsu)/RTCc convert to small type checks /RTCs stack Frame runtime checking
/RTCu uninitialized local usage checks
/clr[:opt] compile for common language runtime,where option is:
pure - produce IL-only output file(no native executable code)
safe - prdouce IL-only verifiable output file
oldsyntax - accept the Managed Extensions syntax
from Visual C++ 2000/2003initialAppDomain - enable inital AppDomain behavior of Visual C++ 2002
noAssembly - do not produce an assembly
/Gd __cdecl calling convertion /Gr __fastcall calling convertion
/Gz __stdcall calling convertion /GZ Enable stack checks(RTCs)
/Qifist[-] use FIST instead of ftol()
/hotpatch ensure function padding for htpatchable images
/arch:< SSE|SE2> minimum CPU architecture requirements,one of:
SSE - enable use of instructions available with SSE enabled CPUS
SSE2 - enable use off instructions available with SSE2 enabled CPUS
-OUTPUT FILES-
/Fa[file] name assembly listing file /FA[scu] configure assembly listing
/Fd[file] name .PDB file /Fe< file> name executable file
/Fm[file] name map file /Fo< file> name object file
/Fp< file> name precompiled header file /Fr[file] name source browser file
/FR[file] name extended .SBR file
/doc[file] process XML documentation comments
and optionally name the .xdc file
--C++编译器命令之PREPROCESSOR--
/AI< dir> add to assembly search path
/FU< file> forced using assembly/model/C don't strip coments /D< name>{=|#}< ext> define macro
/E preprocess to stdout /EP preprocess to stdout,no#line
/P precprocess to file /Fx merge injected code to file
/FI< file> name forced include file /U< name> remove predefined macor
/u remove all predefined macors /I< dir> add to include search pth
/X ignore "standard places"
--C++编译器命令之LANGUAGE--
/Zi enable debugging information /Z7 enable old-style debug info /Zp[n] pack structs on n-byte boundary /Za disable extensions /Ze enable extenstions(defalut) /Zl omit default library name in .OBJ /Zg generate function prototypes /Zs syntax check only /vd{0|1|2} disable/enable vtordisp /vm< x> type of pointers to members /Zc:arg1[,arg2] C++ lanuage confomance,where arguments can be: forScope[-] - enforce Stand C++ for scoping rules wchar_t[-] - wchar_t is the native type,not a typedef /ZI enable Edit and Continue debug info /openmp enable OpenMP 2.0 language extensions
--C++编译器命令之MISCELLANEOUS--
@< FILE> Options response file /?,/help print this help message
/bigobj generate extended object format /c compile only,no link
/errorReport:option Report internal compiler errors to Microsoft
none - do not send report
prompt - prompt to immediately send report
queue - at next admin logon ,prompt to send report (default)
send - send report automatically
/FC use fall pathnames in diagnostcs /H< num> max external name lenght
/J default char type is unsigned /nologo suppress copyright message
/showInclude show include file names /TC compile all files as .c
/Tp< source file> compile file as .cpp /TC compile all file as .c
/TP compile all files as .cpp /V< string> set version string
/w disable all warnings /wd< n> disable warning n
/we< n> treat warning n as an error /wo< n> issue warning n once
/w< l>< n> set warning level 1-4 for n /W< n>
set warning level(defalut n =1)/Wall enable all warnings /WL enable one line diagnostics
/WX treat warning as errors /Yc[file] create .PCH file
/Yd put debug info in every .OBJ /Yl[sym] inject .PCH ref for debug lib
/Yu[file] use .PCH file /Y- disable all PCH options
/Zm< n> max memory alloc(% of defalut) /Wp64 enable 64 bit porting warnings
--C++编译器命令之LINKING--
/LD Create .DLL /LDd Create .Dll debug library /LN Create a .netmodule /F[num] set stack size /link [linker options and libraries] /MD link with MSVCRT.LIB /MT link with LIBCMT.LIB /MDd link with MSVCRTD.LIB deubg lib /MTd link with LIBCMTD.LIB debug lib
感谢各位的阅读!关于“C++编译器命令有哪些”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!