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
{{ message }}
Repository navigation
Commit 8459bef
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/build/reference/diagnostics-compiler-diagnostic-options.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,11 @@ The **/diagnostics** option is available starting in Visual Studio 2017.
42
42
43
43
1. Open your project's **Property Pages** dialog box.
44
44
45
-
2. Under **Configuration Properties**, expand the **C/C++** folder and choose the **General** property page.
45
+
1. Under **Configuration Properties**, expand the **C/C++** folder and choose the **General** property page.
46
46
47
-
3. Use the dropdown control in the **Diagnostics Format** field to select a diagnostics display option. Choose **OK** or **Apply** to save your changes.
47
+
1. Use the dropdown control in the **Diagnostics Format** field to select a diagnostics display option. Choose **OK** or **Apply** to save your changes.
Copy file name to clipboardExpand all lines: docs/build/reference/export-exports-a-function.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
@@ -56,9 +56,9 @@ BOOL CALLBACK PlainFuncName( Things * lpParams)
56
56
57
57
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
Copy file name to clipboardExpand all lines: docs/build/reference/exports.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,11 @@ There are four ways to export a definition, listed in recommended order:
71
71
72
72
1. The [__declspec(dllexport)](../../cpp/dllexport-dllimport.md) keyword in the source code
73
73
74
-
2. An `EXPORTS` statement in a .DEF file
74
+
1. An `EXPORTS` statement in a .DEF file
75
75
76
-
3. An [/EXPORT](../../build/reference/export-exports-a-function.md) specification in a LINK command
76
+
1. An [/EXPORT](../../build/reference/export-exports-a-function.md) specification in a LINK command
77
77
78
-
4. A [comment](../../preprocessor/comment-c-cpp.md) directive in the source code, of the form `#pragma comment(linker, "/export: definition ")`. The following example shows a #pragma comment directive before a function declaration, where `PlainFuncName` is the undecorated name, and `_PlainFuncName@4` is the decorated name of the function:
78
+
1. A [comment](../../preprocessor/comment-c-cpp.md) directive in the source code, of the form `#pragma comment(linker, "/export: definition ")`. The following example shows a #pragma comment directive before a function declaration, where `PlainFuncName` is the undecorated name, and `_PlainFuncName@4` is the decorated name of the function:
3. Modify the **Assembler Output** property to set the **/FAc** and **/FAs** options for assembler, machine, and source code. Modify the **Use Unicode For Assembler Listing** property to set the **/FAu** option for ANSI or UTF-8 output. Modify the **ASM List Location** to set the **/Fa** option for listing file name and location.
72
+
1. Modify the **Assembler Output** property to set the **/FAc** and **/FAs** options for assembler, machine, and source code. Modify the **Use Unicode For Assembler Listing** property to set the **/FAu** option for ANSI or UTF-8 output. Modify the **ASM List Location** to set the **/Fa** option for listing file name and location.
73
73
74
74
Note that setting both **Assembler Output** and **Use Unicode For Assembler Listing** properties can cause [Command-Line Warning D9025](../../error-messages/tool-errors/command-line-warning-d9025.md). To combine these options in the IDE, use the **Additional Options** field in the **Command Line** property page instead.
Copy file name to clipboardExpand all lines: docs/build/reference/midl-specify-midl-command-line-options.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ The file should contain one MIDL command-line option per line.
35
35
36
36
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
Copy file name to clipboardExpand all lines: docs/build/walkthrough-compile-a-c-program-on-the-command-line.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
37
37
38
38
If you are using a different version of Visual Studio or are running a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut. You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window.
39
39
40
-
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:
40
+
1. 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,9 +63,9 @@ Before you can build a C or C++ program on the command line, you must verify tha
63
63
64
64
1. In the developer command prompt window, enter **cd c:\\** to change the current working directory to the root of your C: drive. Next, enter **md c:\simple** to create a directory, and then enter **cd c:\simple** to change to that directory. This is the directory that will contain your source file and the compiled program.
65
65
66
-
2. Enter **notepad simple.c** at the developer command prompt. In the Notepad alert dialog that pops up, choose **Yes** to create a new simple.c file in your working directory.
66
+
1. Enter **notepad simple.c** at the developer command prompt. In the Notepad alert dialog that pops up, choose **Yes** to create a new simple.c file in your working directory.
67
67
68
-
3. In Notepad, enter the following lines of code:
68
+
1. In Notepad, enter the following lines of code:
69
69
70
70
```C
71
71
#include<stdio.h>
@@ -77,9 +77,9 @@ Before you can build a C or C++ program on the command line, you must verify tha
77
77
}
78
78
```
79
79
80
-
4. On the Notepad menu bar, choose **File**, **Save** to save simple.c in your working directory.
80
+
1. On the Notepad menu bar, choose **File**, **Save** to save simple.c in your working directory.
81
81
82
-
5. Switch back to the developer command prompt window. Enter **dir** at the command prompt to list the contents of the c:\simple directory. You should see the source file simple.c in the directory listing, which looks something like this:
82
+
1. Switch back to the developer command prompt window. Enter **dir** at the command prompt to list the contents of the c:\simple directory. You should see the source file simple.c in the directory listing, which looks something like this:
83
83
84
84
```Output
85
85
C:\simple>dir
@@ -98,7 +98,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
98
98
99
99
The dates and other details will differ on your computer. If you don't see your source code file, simple.c, make sure you've changed to the c:\simple directory you created, and in Notepad, make sure that you saved your source file in this directory. Also make sure that you saved the source code with a .c file name extension, not a .txt extension.
100
100
101
-
6. To compile your program, enter **cl simple.c** at the developer command prompt.
101
+
1. To compile your program, enter **cl simple.c** at the developer command prompt.
102
102
103
103
You can see the executable program name, simple.exe, in the lines of output information that the compiler displays:
104
104
@@ -121,7 +121,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
121
121
> [!NOTE]
122
122
> If you get a different compiler or linker error or warning, review your source code to correct any errors, then save it and run the compiler again. For information about specific errors, use the search box at the top of this page to look for the error number.
123
123
124
-
7. To run your program, enter **simple** at the command prompt.
124
+
1. To run your program, enter **simple** at the command prompt.
Copy file name to clipboardExpand all lines: docs/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
40
40
41
41
If you are using a different version of Visual Studio or are running a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut. You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio. Use the shortcut to open the command prompt window.
42
42
43
-
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:
43
+
1. 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:
@@ -64,11 +64,11 @@ Before you can build a C or C++ program on the command line, you must verify tha
64
64
65
65
1. In the developer command prompt window, enter **md c:\hello** to create a directory, and then enter **cd c:\hello** to change to that directory. This is the directory that your source file and the compiled program are created in.
66
66
67
-
2. Enter **notepad hello.cpp** in the command prompt window.
67
+
1. Enter **notepad hello.cpp** in the command prompt window.
68
68
69
69
Choose **Yes** when Notepad prompts you to create a file. This opens a blank Notepad window, ready for you to enter your code in a file named hello.cpp.
70
70
71
-
3. In Notepad, enter the following lines of code:
71
+
1. In Notepad, enter the following lines of code:
72
72
73
73
```cpp
74
74
#include<iostream>
@@ -81,11 +81,11 @@ Before you can build a C or C++ program on the command line, you must verify tha
81
81
82
82
This is a very simple program that will write one line of text on the screen and then exit. To minimize errors, copy this code and paste it into Notepad.
83
83
84
-
4. Save your work! In Notepad, on the **File** menu, choose **Save**.
84
+
1. Save your work! In Notepad, on the **File** menu, choose **Save**.
85
85
86
86
Congratulations, you have created a Visual C++ source file, hello.cpp, that is ready to compile.
87
87
88
-
5. Switch back to the developer command prompt window. Enter **dir** at the command prompt to list the contents of the c:\hello directory. You should see the source file hello.cpp in the directory listing, which looks something like this:
88
+
1. Switch back to the developer command prompt window. Enter **dir** at the command prompt to list the contents of the c:\hello directory. You should see the source file hello.cpp in the directory listing, which looks something like this:
89
89
90
90
```Output
91
91
c:\hello>dir
@@ -104,7 +104,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
104
104
105
105
The dates and other details will differ on your computer. If you don't see your source code file, hello.cpp, make sure you've changed to the c:\hello directory you created, and in Notepad, make sure that you saved your source file in this directory. Also make sure that you saved the source code with a .cpp file name extension, not a .txt extension.
106
106
107
-
6. At the developer command prompt, enter `cl /EHsc hello.cpp` to compile your program.
107
+
1. At the developer command prompt, enter `cl /EHsc hello.cpp` to compile your program.
108
108
109
109
The cl.exe compiler generates an .obj file that contains the compiled code, and then runs the linker to create an executable program named hello.exe. This name appears in the lines of output information that the compiler displays. The output of the compiler should look something like this:
110
110
@@ -127,7 +127,7 @@ Before you can build a C or C++ program on the command line, you must verify tha
127
127
> [!NOTE]
128
128
> If you get a different compiler or linker error or warning, review your source code to correct any errors, then save it and run the compiler again. For information about specific errors, use the search box on this MSDN page to look for the error number.
129
129
130
-
7. To run the hello.exe program, at the command prompt, enter `hello`.
130
+
1. To run the hello.exe program, at the command prompt, enter `hello`.
0 commit comments