tags:

views:

277

answers:

3

Can you tell me what are the __DEFAULT__, implicit compiler options for cl.exe and for link.exe when compiling from the command line, like:

cl whatever.c

Thanks!

update: To clarify: I am not interesed in the available command line options, I have even linked them from the question. What I am asking for is a list of implicit, default command line options used when you specify none and compile from the command line.

+1  A: 

Check cl /? on link /? at the command line. I believe that the defaults differ for each version.

D.Shawley
This only lists the available compiler options, not the default compiler options.
Hmm... I could have sworn that the description mentioned the defaults. I don't have a Windows box here so I can't check right now.
D.Shawley
+1  A: 

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

As is usual for Microsoft documentation, it is a bit haphazard, but it does seem to be complete. When an option is the default setting, that is noted (not in any consistent manner, though.)

alex tingle
Why can't people differentiate between "available command line options" and "default command line options"? See, when you compile a .c file without specifying compiler options some of them will be turned on by default, implicitly.
My answer did address that issue, so perhaps it is you who lacks reading comprehension.
alex tingle
+1  A: 

There does not seem to be much information on the actual defaults on microsoft web sites, however Geoff Chappell seems to have done some research into this subject. 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, are two different things.

To further answer the question, you can see what options cl passes to the compiler modules c1xx.dll and c2.dll 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
wozname