tags:

views:

78

answers:

1
cl : Command line warning D9002 : ignoring unknown option '-mwindows'

Seems -mwindows is only for gcc, does cl has a similar option?

+2  A: 

That would probably the /subsystem option to the linker
Specifically /SUBSYSTEM:WINDOWS

It allows you to choose between compiling a console application and a windows application by setting a flag in the PE header

shoosh
It reports: `cl : Command line warning D9002 : ignoring unknown option '/SUBSYSTEM:WINDOWS'`
Gtker
@Runner It is documented as a linker option. You probably must tell `cl` to pass the option to the linker.
Pascal Cuoq
@Pascal Cuoq ,how do I tell `cl` to do that?
Gtker
I googled "cl options" and one of the first hits was http://msdn.microsoft.com/en-us/library/610ecb4h(VS.80).aspx , which contains the information. And I have not used cl in years, so I can't really test it.
Pascal Cuoq
To pass linker options on the `cl` command line, put `/link ` before them
Chris Dodd
Why are you using `cl` directly and not through visual studio or a makefile created by visual studio?
shoosh