This documentation is archived and is not being maintained.

Compiler Error C2220

warning treated as error - no object file generated

/WX tells the compiler to treat all warnings as errors. Since an error occurred, no object or executable file was generated.

To fix by using the following possible solutions

  1. Fix the problem that caused the warning.

  2. Compile at a lower warning level.

  3. Compile without /WX.

Show: