Default Options for Visual C ++ Compiler

Can you tell me what __ DEFAULT __ is , implicit compiler options for cl.exe and for link.exe when compiling from the command line, for example:

cl whatever.c 

Thanks!

update . To clarify: I'm not interested in the available command line options, I even linked them to a question. What I'm asking for is a list of implicit default command line options that are used when you specify none and compile from the command line.

+6
c ++ visual-c ++
source share
3 answers

There doesn't seem to be much information on actual defaults on Microsoft websites, however, Jeff Chappell seems to have done some research on this topic. Here is the link:

http://www.geoffchappell.com/viewer.htm?doc=studies/msvc/cl/cl/initial.htm&tx=27

As we all know what the documentation says and what the software actually does, these are two different things.

To answer the question, you can see which cl options are passed to the c1xx.dll and c2.dll compiler modules by passing the / Bd option to cl:

 cl /Bd helloworld.cpp 

To see the environment variables that the compiler and linker uses, type:

 cl /Be helloworld.cpp 
+4
source share

I am always just looking google for "cl options".
This is the current top hit: Compiler Command Line Syntax (C ++) [MSDN]

As usual for Microsoft documentation, this is a bit messy, but it seems to be completed. If the parameter is the default setting, this is checked (but by no means consistent).

+1
source share

Check cl /? on link /? on the command line. I believe that the default values ​​are different for each version.

0
source share

All Articles