visual studio – How to see what the warning is in “the following warning is treated as an error”


When I compile in MSVC with:

/Wall
/WX

I get many more warnings in the Output window, like 8000. Then when compilation fails due to something wrong the errors show in the Error List window, and they say:

the following warning is treated as an error

Then if I click on that it takes me to the part of the code that it relates to, which is handy, however there is no way of knowing what the warning/error is. I assume it was listed in the Output window when it was emitting the warnings, but there’s no way to know which warning is related to the error. Is there a way? Am I doing this wrong?

Edit: Also, even worse, the linker error doesn’t show anything. I add:

add_link_options(/WX)

Because /WX is also a linker option. And the only thing I get in the Error list is:

warning treated as error; no output file generated

Absolutely nothing but that, doesn’t even take me to the place in my code.

Leave a Reply

Your email address will not be published. Required fields are marked *