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/projects-and-build-systems-cpp.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
@@ -13,25 +13,25 @@ You can use Visual Studio to edit, compile, and build any C++ code base with ful
13
13
14
14
## C++ compilation
15
15
16
-
To *build* a C++ program means to compile source code from one or more files and then link those files into an executable file (.exe), a dynamic-link library (.dll) or a static library (.lib).
16
+
To *build* a C++ program means to compile source code from one or more files and then link those files into an executable file (`.exe`), a dynamic-link library (`.dll`) or a static library (`.lib`).
17
17
18
18
Basic C++ compilation involves three main steps:
19
19
20
20
- The C++ preprocessor transforms all the #directives and macro definitions in each source file. This creates a *translation unit*.
21
-
- The C++ compiler compiles each translation unit into object files (.obj), applying whatever compiler options have been set.
21
+
- The C++ compiler compiles each translation unit into object files (`.obj`), applying whatever compiler options have been set.
22
22
- The *linker* merges the object files into a single executable, applying the linker options that have been set.
23
23
24
24
## The MSVC toolset
25
25
26
26
The Microsoft C++ compiler, linker, standard libraries, and related utilities make up the MSVC compiler toolset (also called a toolchain or "build tools"). These are included in Visual Studio. You can also download and use the command-line toolset as a free standalone package. For more information, see [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) on the Visual Studio Downloads page.
27
27
28
-
You can build simple programs by invoking the MSVC compiler (cl.exe) directly from the command line. The following command accepts a single source code file, and invokes cl.exe to build an executable called *hello.exe*:
28
+
You can build simple programs by invoking the MSVC compiler (`cl.exe`) directly from the command line. The following command accepts a single source code file, and invokes `cl.exe` to build an executable called *`hello.exe`*:
29
29
30
30
```cmd
31
31
cl /EHsc hello.cpp
32
32
```
33
33
34
-
Here the compiler (cl.exe) automatically invokes the C++ preprocessor and the linker to produce the final output file. For more information, see [Building on the command line](building-on-the-command-line.md).
34
+
Here the compiler (`cl.exe`) automatically invokes the C++ preprocessor and the linker to produce the final output file. For more information, see [Building on the command line](building-on-the-command-line.md).
35
35
36
36
## Build systems and projects
37
37
@@ -41,7 +41,7 @@ The following list shows various options for Visual Studio Projects - C++:
41
41
42
42
- Create a Visual Studio project by using the Visual Studio IDE and configure it by using property pages. Visual Studio projects produce programs that run on Windows. For an overview, see [Compiling and Building](/visualstudio/ide/compiling-and-building-in-visual-studio) in the Visual Studio documentation.
43
43
44
-
- Open a folder that contains a CMakeLists.txt file. CMake support is integrated into Visual Studio. You can use the IDE to edit, test, and debug without modifying the CMake files in any way. This enables you to work in the same CMake project as others who might be using different editors. CMake is the recommended approach for cross-platform development. For more information, see [CMake projects](cmake-projects-in-visual-studio.md).
44
+
- Open a folder that contains a `CMakeLists.txt` file. CMake support is integrated into Visual Studio. You can use the IDE to edit, test, and debug without modifying the CMake files in any way. This enables you to work in the same CMake project as others who might be using different editors. CMake is the recommended approach for cross-platform development. For more information, see [CMake projects](cmake-projects-in-visual-studio.md).
45
45
46
46
- Open a loose folder of source files with no project file. Visual Studio will use heuristics to build the files. This is an easy way to compile and run small console applications. For more information, see [Open Folder projects](open-folder-projects-cpp.md).
47
47
@@ -51,7 +51,7 @@ The following list shows various options for Visual Studio Projects - C++:
51
51
52
52
## MSBuild from the command line
53
53
54
-
You can invoke MSBuild from the command line by passing it a .vcxproj file along with command-line options. This approach requires a good understanding of MSBuild, and is recommended only when necessary. For more information, see [MSBuild](msbuild-visual-cpp.md).
54
+
You can invoke MSBuild from the command line by passing it a `.vcxproj` file along with command-line options. This approach requires a good understanding of MSBuild, and is recommended only when necessary. For more information, see [MSBuild](msbuild-visual-cpp.md).
55
55
56
56
## In This Section
57
57
@@ -74,7 +74,7 @@ Discusses how to use the C/C++ compiler and build tools directly from the comman
74
74
How to create, debug, and deploy C/C++ DLLs (shared libraries) in Visual Studio.
75
75
76
76
[Walkthrough: Creating and Using a Static Library](walkthrough-creating-and-using-a-static-library-cpp.md)\
77
-
How to create a **.lib** binary file.
77
+
How to create a `.lib` binary file.
78
78
79
79
[Building C/C++ Isolated Applications and Side-by-side Assemblies](building-c-cpp-isolated-applications-and-side-by-side-assemblies.md)\
80
80
Describes the deployment model for Windows Desktop applications, based on the idea of isolated applications and side-by-side assemblies.
0 commit comments