You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,22 +13,31 @@ Specifies whether to treat linker warnings as errors.
13
13
## Syntax
14
14
15
15
> **`/WX`**\[**`:NO`**]
16
+
> **`/WX`**\[**`:`***`nnnn`*[**`,`***`nnnn`*...]]
16
17
17
18
## Remarks
18
19
19
20
The **`/WX`** linker option causes no output file to be generated if the linker generates a warning.
20
21
21
22
This option is similar to **`/WX`** for the compiler. For more information, see [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](compiler-option-warning-level.md). However, specifying **`/WX`** for the compilation doesn't imply that **`/WX`** will also be in effect for the link phase; you must explicitly specify **`/WX`** for each tool.
22
23
23
-
By default, **`/WX`** isn't in effect. To treat linker warnings as errors, specify **`/WX`**. **`/WX:NO`** is the same as not specifying **`/WX`**.
24
+
In Visual Studio 2022 and later versions, you can specify **`/WX`** with one or more comma-separated *`nnnn`* arguments, where *`nnnn`* is a number between 4000 and 4999. The linker treats the corresponding *`LNKnnnn`* warnings as errors.
25
+
26
+
By default, **`/WX`** isn't in effect. To treat linker warnings as errors, specify a **`/WX`** option. **`/WX:NO`** is the same as not specifying **`/WX`**, and overrides any previous **`/WX`** linker option.
24
27
25
28
### To set this linker option in the Visual Studio development environment
26
29
27
30
1. Open the project's **Property Pages** dialog box. For more information, see [Set compiler and build properties](../working-with-project-properties.md).
helpviewer_keywords: ["error codes, printing", "sys_errlist global variable", "doserrno global variable", "errno global variable", "_doserrno global variable", "_sys_errlist global variable", "_sys_nerr global variable", "sys_nerr global variable"]
0 commit comments