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
Copy file name to clipboardExpand all lines: docs/build/reference/debug-generate-debug-info.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,11 +57,11 @@ The linker puts the debugging information into a program database (PDB) file. It
57
57
58
58
An executable (.exe file or DLL) created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension .pdb to name the program database, and embeds the path where it was created. To override this default, set [/PDB](../../build/reference/pdb-use-program-database.md) and specify a different file name.
59
59
60
-
The **/DEBUG:FULL** option is the linker default for debug builds in Visual Studio 2015, set when you specify /DEBUG with no additional options. This option moves all private symbol information from individual compilation products (object files and libraries) into a single PDB, and can be the most time-consuming part of the link. However, the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed.
61
-
62
-
The **/DEBUG:FASTLINK** option is the linker default for debug builds in Visual Studio 2017 RC, set when you specify /DEBUG with no additional options. This option leaves private symbol information in the individual compilation products used to build the executable. It generates a limited PDB that indexes into the debug information in the object files and libraries used to build the executable instead of making a full copy. This option can link from two to four times as fast as full PDB generation, and is recommended when you are debugging locally and have the build products available. This limited PDB can't be used for debugging when the required build products are not available, such as when the executable is deployed on another computer. In a developer command prompt, you can use the mspdbcmf.exe tool to generate a full PDB from this limited PDB. In Visual Studio, use the Project or Build menu items for generating a full PDB file to create a full PDB for the project or solution.
63
-
64
-
The **/DEBUG:NONE** option does not generate a PDB, and is the linker default for release builds.
60
+
The **/DEBUG:FASTLINK** option is the linker default for debug builds in Visual Studio 2017, set when you specify /DEBUG with no additional options. This option leaves private symbol information in the individual compilation products used to build the executable. It generates a limited PDB that indexes into the debug information in the object files and libraries used to build the executable instead of making a full copy. This option can link from two to four times as fast as full PDB generation, and is recommended when you are debugging locally and have the build products available. This limited PDB can't be used for debugging when the required build products are not available, such as when the executable is deployed on another computer. In a developer command prompt, you can use the mspdbcmf.exe tool to generate a full PDB from this limited PDB. In Visual Studio, use the Project or Build menu items for generating a full PDB file to create a full PDB for the project or solution.
61
+
62
+
The **/DEBUG:FULL** option is the linker default for debug builds in Visual Studio 2015, set when you specify /DEBUG with no additional options. This option moves all private symbol information from individual compilation products (object files and libraries) into a single PDB, and can be the most time-consuming part of the link. However, the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed.
63
+
64
+
The **/DEBUG:NONE** option does not generate a PDB, and is the linker default for release builds.
65
65
66
66
The compiler's [C7 Compatible](../../build/reference/z7-zi-zi-debug-information-format.md) (/Z7) option causes the compiler to leave the debugging information in the .obj files. You can also use the [Program Database](../../build/reference/z7-zi-zi-debug-information-format.md) (/Zi) compiler option to store the debugging information in a PDB for the .obj file. The linker looks for the object's PDB first in the absolute path written in the .obj file, and then in the directory that contains the .obj file. You cannot specify an object's PDB file name or location to the linker.
67
67
@@ -79,7 +79,7 @@ It is not possible to create an .exe or .dll that contains debug information. De
79
79
80
80
3. Click the **Debugging** property page.
81
81
82
-
4. Modify the **Generate Debug Info** property to enable PDB generation. This enables /DEBUG:FASTLINK by default in Visual Studio 2017 RC.
82
+
4. Modify the **Generate Debug Info** property to enable PDB generation. This enables /DEBUG:FASTLINK by default in Visual Studio 2017.
83
83
84
84
4. Modify the **Generate Full Program Database File** property to enable /DEBUG:FULL for full PDB generation for every incremental build.
Copy file name to clipboardExpand all lines: docs/build/reference/diagnostics-compiler-diagnostic-options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ The **/diagnostics:caret** option includes the column where the issue was found
55
55
56
56
Note that in some cases, the compiler does not detect an issue where it occurred. For example, a missing semicolon may not be detected until other, unexpected symbols have been encountered. The column is reported and the caret is placed where the compiler detected that something was wrong, which is not always where you need to make your correction.
57
57
58
-
The /diagnostics option is available starting in Visual Studio 2017 RC.
58
+
The /diagnostics option is available starting in Visual Studio 2017.
Copy file name to clipboardExpand all lines: docs/build/reference/permissive-standards-conformance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ Environment-specific extensions and language areas that the standard leaves up t
57
57
58
58
The **/permissive-** option uses the conformance support in the current compiler version to determine which language constructs are non-conforming. The option does not determine if your code conforms to a specific version of the C++ standard. To enable all implemented compiler support for the latest draft standard, use the [/std:latest](../../build/reference/std-specify-language-standard-version.md) option. To restrict the compiler support to more closely match the C++14 standard, use the [/std:c++14](../../build/reference/std-specify-language-standard-version.md) option, which is the default.
59
59
60
-
Not all C++11, C++14, or draft C++17 standards-conforming code is supported by the Visual C++ compiler in Visual Studio 2017 RC. The **/permissive-** option may not detect issues regarding two-phase name lookup, binding a non-const reference to a temporary, treating copy init as direct init, allowing multiple user-defined conversions in initialization, or alternative tokens for logical operators, and other non-supported conformance areas. For more information about conformance issues in Visual C++, see [Nonstandard Behavior](../../cpp/nonstandard-behavior.md).
60
+
Not all C++11, C++14, or draft C++17 standards-conforming code is supported by the Visual C++ compiler in Visual Studio 2017. The **/permissive-** option may not detect issues regarding two-phase name lookup, binding a non-const reference to a temporary, treating copy init as direct init, allowing multiple user-defined conversions in initialization, or alternative tokens for logical operators, and other non-supported conformance areas. For more information about conformance issues in Visual C++, see [Nonstandard Behavior](../../cpp/nonstandard-behavior.md).
61
61
62
62
### How to fix your code
63
63
Here are some examples of code that is detected as non-conforming when you use **/permissive-**, along with suggested ways to fix the issues.
Copy file name to clipboardExpand all lines: docs/build/reference/std-specify-language-standard-version.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,10 @@ Enable supported C++ language features from the specified version of the C++ lan
42
42
43
43
The **/std:c++latest** option enables the set of C++ language and library features implemented by Visual C++ to track the most recent Working Draft and defect updates of the C++ Standard. Use this switch to get the latest language features supported by the compiler. For a list of supported language and library features, see [What's New for Visual C++](../../what-s-new-for-visual-cpp-in-visual-studio.md). The **/std:c++latest** option does not enable features guarded by the **/experimental** switch.
44
44
45
-
The **/std:c++14** and **/std:c++latest** options are available beginning in Visual C++ 2013 Update 3.
45
+
The **/std:c++14** and **/std:c++latest** options are available beginning in Visual C++ 2015 Update 3.
46
46
47
47
> [!NOTE]
48
-
> Depending on the Visual C++ compiler version or update level, certain C++14 features may not be fully implemented or fully conformant when you specify the **/std:c++14** option. For example, the Visual C++ 2015 Update 3 compiler does not fully support C++14-conformant `constexpr`, expression SFINAE, or 2-phase name lookup.
48
+
> Depending on the Visual C++ compiler version or update level, certain C++14 features may not be fully implemented or fully conformant when you specify the **/std:c++14** option. For example, the Visual C++ 2017 RTM compiler does not fully support C++14-conformant `constexpr`, expression SFINAE, or 2-phase name lookup. For an overview of C++ language conformance in Visual C++, see [Visual C++ Language Conformance](../../visual-cpp-language-conformance.md).
49
49
50
50
### To set this compiler option in the Visual Studio development environment
Copy file name to clipboardExpand all lines: docs/build/reference/zo-enhance-optimized-debugging.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,9 +47,9 @@ Generate enhanced debugging information for optimized code in non-debug builds.
47
47
```
48
48
49
49
## Remarks
50
-
The **/Zo** compiler switch generates enhanced debugging information for optimized code. Optimization may use registers for local variables, reorder code, vectorize loops, and inline function calls. These optimizations can obscure the relationship between the source code and the compiled object code. The **/Zo** switch tells the compiler to generate additional debugging information for local variables and inlined functions. Use it to see variables in the **Autos**, **Locals**, and **Watch** windows when you step through optimized code in the Visual Studio debugger. It also enables stack traces to show inlined functions in the WinDBG debugger. Debug builds that have disabled optimizations ([/Od](../../build/reference/od-disable-debug.md)) do not need the additional debugging information generated when **/Zo** is specified. Use the **/Zo** switch to debug Release configurations with optimization turned on. For more information on optimization switches, see [/O Options (Optimize Code)](../../build/reference/o-options-optimize-code.md). The **/Zo** option is enabled by default in Visual Studio 2015 when you specify debugging information with **/Zi** or **/Z7**. Specify **/Zo-** to explicitly disable this compiler option.
50
+
The **/Zo** compiler switch generates enhanced debugging information for optimized code. Optimization may use registers for local variables, reorder code, vectorize loops, and inline function calls. These optimizations can obscure the relationship between the source code and the compiled object code. The **/Zo** switch tells the compiler to generate additional debugging information for local variables and inlined functions. Use it to see variables in the **Autos**, **Locals**, and **Watch** windows when you step through optimized code in the Visual Studio debugger. It also enables stack traces to show inlined functions in the WinDBG debugger. Debug builds that have disabled optimizations ([/Od](../../build/reference/od-disable-debug.md)) do not need the additional debugging information generated when **/Zo** is specified. Use the **/Zo** switch to debug Release configurations with optimization turned on. For more information on optimization switches, see [/O Options (Optimize Code)](../../build/reference/o-options-optimize-code.md). The **/Zo** option is enabled by default in Visual Studio when you specify debugging information with **/Zi** or **/Z7**. Specify **/Zo-** to explicitly disable this compiler option.
51
51
52
-
The **/Zo** switch is available in Visual Studio 2013 Update 3, and it replaces the previously undocumented **/d2Zi+** switch.
52
+
The **/Zo** switch is available starting in Visual Studio 2013 Update 3, and it replaces the previously undocumented **/d2Zi+** switch.
53
53
54
54
### To set the /Zo compiler option in Visual Studio
Copy file name to clipboardExpand all lines: docs/build/walkthrough-compile-a-c-program-on-the-command-line.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Visual C++ includes a C compiler that you can use to create everything from basi
44
44
45
45
Visual Studio is a powerful integrated development environment that supports a full-featured editor, resource managers, debuggers, and compilers for many languages and platforms. For information on these features and how to download and install Visual Studio, including the free Visual Studio Community edition, see [VisualStudio.com](https://www.visualstudio.com/).
46
46
47
-
The Microsoft Visual C++ Build Tools installs only the command-line compiler, tools, and libraries you need to build C and C++ programs. It's perfect for build labs or classroom exercises and installs relatively quickly. To install only the command-line tools, download and install [Microsoft Visual C++ Build Tools 2015](http://go.microsoft.com/fwlink/?LinkId=691126).
47
+
The Visual Studio Build Tools installs only the command-line compilers, tools, and libraries you need to build C and C++ programs. It's perfect for build labs or classroom exercises and installs relatively quickly. To install only the command-line tools, download [Visual Studio Build Tools](https://go.microsoft.com/fwlink/?linkid=840931)and run the installer. For more information, see [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools).
48
48
49
49
Before you can build a C or C++ program on the command line, you must verify that the tools are installed, and that you can access them from the command line. Visual C++ has complex requirements for the command-line environment in order to find the tools, headers, and libraries it uses. **You can't use Visual C++ in a plain command prompt window**. You need a *developer* command prompt, which is a regular command prompt that has all the required environment variables set. Fortunately, Visual C++ installs shortcuts for you to launch developer command prompts that have the environment set up for command line builds. Unfortunately, the names of the developer command prompt shortcuts and where they are located are different in almost every version of Visual C++ and on different versions of Windows. Your first walkthrough task is to find the right shortcut to use.
50
50
@@ -53,7 +53,7 @@ Visual C++ includes a C compiler that you can use to create everything from basi
53
53
54
54
## Open a developer command prompt
55
55
56
-
1. If you have installed Visual Studio 2015 on Windows 10, open the Start menu and choose **All apps**. Scroll down and open the **Visual Studio 2015** folder (not the Visual Studio 2015 app). Choose **Developer Command Prompt for VS2015** to open the command prompt window.
56
+
1. If you have installed Visual Studio 2017 on Windows 10, open the Start menu and choose **All apps**. Scroll down and open the **Visual Studio 2017** folder (not the Visual Studio 2017 app). Choose **Developer Command Prompt for VS 2017** to open the command prompt window.
57
57
58
58
If you have installed Microsoft Visual C++ Build Tools 2015 on Windows 10, open the **Start** menu and choose **All apps**. Scroll down and open the **Visual C++ Build Tools** folder. Choose **Visual C++ 2015 x86 Native Tools Command Prompt** to open the command prompt window.
59
59
@@ -62,19 +62,21 @@ Visual C++ includes a C compiler that you can use to create everything from basi
62
62
2. Next, verify that the Visual C++ developer command prompt is set up correctly. In the command prompt window, enter `cl` and verify that the output looks something like this:
63
63
64
64
```Output
65
-
C:\Program Files (x86)\Microsoft Visual Studio 14.0>cl
66
-
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x86
There may be differences in the current directory or version numbers, depending on the version of Visual C++ and any updates installed. If this is similar to what you see, then you are ready to build C or C++ programs at the command line.
73
75
74
76
> [!NOTE]
75
77
> If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104 when you run the **cl** command, then either you are not using a developer command prompt, or something is wrong with your installation of Visual C++. You must fix this issue before you can continue.
76
78
77
-
If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your Visual C++ installation may have a problem. Try reinstalling the Visual C++ component in Visual Studio, or reinstall the Microsoft Visual C++ Build Tools. Don't go on to the next section until this works. For more information about installing and troubleshooting Visual C++, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
79
+
If you can't find the developer command prompt shortcut, or if you get an error message when you enter `cl`, then your Visual C++ installation may have a problem. Try reinstalling the Visual C++ component in Visual Studio, or reinstall the Visual Studio Build Tools. Don't go on to the next section until this works. For more information about installing and troubleshooting Visual C++, see [Install Visual Studio](/visualstudio/install/install-visual-studio).
78
80
79
81
> [!NOTE]
80
82
> Depending on the version of Windows on the computer and the system security configuration, you might have to right-click to open the shortcut menu for the developer command prompt shortcut and then choose **Run as Administrator** to successfully build and run the program that you create by following this walkthrough.
@@ -108,9 +110,9 @@ Visual C++ includes a C compiler that you can use to create everything from basi
108
110
109
111
Directory of C:\simple
110
112
111
-
10/02/2015 03:46 PM <DIR> .
112
-
10/02/2015 03:46 PM <DIR> ..
113
-
10/02/2015 03:36 PM 143 simple.c
113
+
10/02/2017 03:46 PM <DIR> .
114
+
10/02/2017 03:46 PM <DIR> ..
115
+
10/02/2017 03:36 PM 143 simple.c
114
116
1 File(s) 143 bytes
115
117
2 Dir(s) 514,900,566,016 bytes free
116
118
@@ -124,11 +126,11 @@ Visual C++ includes a C compiler that you can use to create everything from basi
124
126
125
127
```Output
126
128
c:\simple>cl simple.c
127
-
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23918 for x86
129
+
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x86
128
130
Copyright (C) Microsoft Corporation. All rights reserved.
129
131
130
132
simple.c
131
-
Microsoft (R) Incremental Linker Version 14.00.23918.0
133
+
Microsoft (R) Incremental Linker Version 14.10.25017.0
132
134
Copyright (C) Microsoft Corporation. All rights reserved.
0 commit comments