/WX

midl /WX

Examples

midl /WX filename.idl  
midl /W3 /WX filename.idl  
 

Remarks

The /WX switch instructs the MIDL compiler to handle all errors at the given warning level as errors. If the /WX switch is specified and the /Wn switch is not specified, all warnings at the default level, level 1, are treated as errors.

The /Wn switch directs the compiler to display all warnings at level n and /WX directs the compiler to handle all warnings as errors. The combination of these two switches directs the compiler to handle all warnings at level n as errors.

Errors are different from warnings. Errors cause the MIDL compiler to halt processing of the IDL file. Warnings cause the MIDL compiler to emit an informational message and continue processing the IDL file.

Warning-level zero (0) directs the MIDL compiler to suppress warning information. When the /W0 and /WX switches are combined, the MIDL compiler suppresses all warning information. In this case, the /WX switch has no effect.

See Also

General MIDL Command-line Syntax, /W