Skip to content

Commit e67a2b4

Browse files
author
Colin Robertson
committed
Update link names and instructions
1 parent 256d74a commit e67a2b4

17 files changed

+71
-44
lines changed

docs/build/TOC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@
9999
## [Naming Conventions for MFC DLLs](naming-conventions-for-mfc-dlls.md)
100100
## [Calling DLL Functions from Visual Basic Applications](calling-dll-functions-from-visual-basic-applications.md)
101101
# [Compiler Intrinsics and Assembly Language](../intrinsics/TOC.md)
102-
# [Building on the Command Line](building-on-the-command-line.md)
102+
# [Build C/C++ code on the command line](building-on-the-command-line.md)
103103
## [Walkthrough: Compiling a Native C++ Program on the Command Line](walkthrough-compiling-a-native-cpp-program-on-the-command-line.md)
104104
## [Walkthrough: Compile a C program on the command line](walkthrough-compile-a-c-program-on-the-command-line.md)
105105
## [Walkthrough: Compiling a C++/CLI Program on the Command Line](walkthrough-compiling-a-cpp-cli-program-on-the-command-line.md)
106106
## [Walkthrough: Compiling a C++/CX Program on the Command Line](walkthrough-compiling-a-cpp-cx-program-on-the-command-line.md)
107-
## [Setting the Path and Environment Variables for Command-Line Builds](setting-the-path-and-environment-variables-for-command-line-builds.md)
107+
## [Set the Path and Environment Variables for Command-Line Builds](setting-the-path-and-environment-variables-for-command-line-builds.md)
108108
## [NMAKE Reference](nmake-reference.md)
109109
### [Running NMAKE](running-nmake.md)
110110
#### [NMAKE Options](nmake-options.md)

docs/build/building-c-cpp-programs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can build Visual C++ projects either in Visual Studio or on the command line
4646
[Building C++ Projects in Visual Studio](../ide/building-cpp-projects-in-visual-studio.md)
4747
Discusses how to use the Visual Studio IDE to build your C/C++ project.
4848

49-
[Building on the Command Line](../build/building-on-the-command-line.md)
49+
[Build C/C++ code on the command line](../build/building-on-the-command-line.md)
5050
Discusses how to use the C/C++ command-line compiler and build tools that are included in Visual Studio.
5151

5252
[Building C/C++ Isolated Applications and Side-by-side Assemblies](../build/building-c-cpp-isolated-applications-and-side-by-side-assemblies.md)

docs/build/building-on-the-command-line.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ translation.priority.mt:
3737
- "pt-br"
3838
- "tr-tr"
3939
---
40-
# Set up to build C/C++ code on the command Line
40+
# Build C/C++ code on the command line
4141

4242
You can build C and C++ applications on the command line by using tools that are included in [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)].
4343

4444
When you choose one of the C++ workloads in the [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] Installer, it installs a command-line toolset that includes the C/C++ compilers, linkers, and other build tools. To work correctly, these command-line tools require several specific environment variables to add the tools to the path and to set include file, library file, and SDK locations. To make it easy to set these environment variables, the installer creates customized command files, also known as batch files, during installation. You can run one of these command files in a command prompt window to set a specific build configuration. For convenience, the installer also creates shortcuts in your Start menu (or Start page on Windows 8.x) that start command prompt windows by using these command files, so all the required environment variables are set and ready to use.
4545

46-
The required environment variables are specific to your installation and to the build configuration you choose, and might be changed by product updates or upgrades. Therefore, we strongly recommend that you use one of the installed command prompt shortcuts or command files instead of setting the environment variables in Windows yourself. For more information, see [Setting the Path and Environment Variables for Command-Line Builds](../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
46+
The required environment variables are specific to your installation and to the build configuration you choose, and might be changed by product updates or upgrades. Therefore, we strongly recommend that you use one of the installed command prompt shortcuts or command files instead of setting the environment variables in Windows yourself. For more information, see [Set the Path and Environment Variables for Command-Line Builds](../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
4747

4848
The command-line toolsets, command files, and command prompt shortcuts that are installed depend on your computer processor and the options selected during installation. At a minimum, the 32-bit, x86-native tools that build 32-bit, x86-native code and 64-bit, x64-native code are installed. If you have a 64-bit processor, the 64-bit native tools that build 32-bit native code and 64-bit native code are also installed. If you choose to install the optional C++ Universal Windows Platform tools, then the 32-bit and 64-bit native tools that build ARM code are also installed.
4949

@@ -97,23 +97,44 @@ You can use the **store** or **uwp** options to specify the platform type, or ne
9797

9898
## To set up the build environment in an existing command prompt window
9999

100-
1. At the command prompt, use the CD command to change to the Visual C++ installation directory.
100+
1. At the command prompt, use the CD command to change to the Visual Studio installation directory. Then, use CD again to change to the subdirectory that contains the configuration-specific command files. For Visual Studio 2017, this is the VC\Ausiliary\Build subdirectory. For Visual Studio 2015, use the VC subdirectory.
101101

102-
2. To configure this command prompt window for 32-bit x86 builds, at the command prompt, enter:
102+
1. To configure this command prompt window to use 32-bit tools to build code for x86 platforms, at the command prompt, enter:
103103

104-
`vc\vcvarsall.bat`
104+
`vcvarsall`
105+
106+
1. To configure this command prompt window to use 32-bit tools to build code for x64 platforms, at the command prompt, enter:
107+
108+
`vcvarsall x86_amd64`
109+
110+
1. To configure this command prompt window to use 32-bit tools to build code for ARM platforms, at the command prompt, enter:
111+
112+
`vcvarsall x86_arm`
113+
114+
1. To configure this command prompt window to use 64-bit tools to build code for x64 platforms, at the command prompt, enter:
105115

116+
`vcvarsall amd64`
117+
118+
1. To configure this command prompt window to use 64-bit tools to build code for x86 platforms, at the command prompt, enter:
119+
120+
`vcvarsall amd64_x86`
121+
122+
1. To configure this command prompt window to use 64-bit tools to build code for ARM platforms, at the command prompt, enter:
123+
124+
`vcvarsall amd64_arm`
125+
106126
The command file sets the required environment variables for the paths to the build tools, libraries, and headers. You can now use this command prompt window to run the command-line compiler and tools.
107127

108128
If you are using [DEVENV](/visualstudio/ide/reference/devenv-command-line-switches) for command-line builds, the environment set by vcvarsall.bat or other command files does not affect your builds, unless you also specify the **/useenv** option.
109129

110-
## To open a Developer Command Prompt window
130+
<a name="developer_command_prompt"></a>
131+
## To open a developer command prompt window
111132

112-
1. On the desktop, open the Windows **Start** menu, and then scroll to the **Visual Studio** folder for your version of Visual Studio. In some versions of Visual Studio, the folder is called **Visual Studio Tools**.
133+
1. On the desktop, open the Windows **Start** menu, and then scroll to find and open the folder for your version of Visual Studio, for example, **Visual Studio 2017**. In some older versions of Visual Studio, the shortcuts are in a subfolder called **Visual Studio Tools**.
113134

114-
2. In the **Visual Studio** folder, choose the **Developer Command Prompt** for your version of [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] to start a developer command prompt window set up to use the default build configuration of 32-bit, x86-native tools to build 32-bit, x86-native code. If you prefer a non-default build configuration, choose one of the native or cross tools command prompts to specify the host and target architecture.
135+
2. In the folder, choose the **Developer Command Prompt** for your version of Visual Studio. This shortcut starts a developer command prompt window that uses the default build configuration of 32-bit, x86-native tools to build 32-bit, x86-native code. If you prefer a non-default build configuration, choose one of the native or cross tools command prompts to specify the host and target architecture.
115136

116-
An even faster way to open a developer command prompt window is to enter "Developer Command Prompt" in the desktop search box, then choose the desired result.
137+
An even faster way to open a developer command prompt window is to enter *developer command prompt* in the desktop search box, then choose the desired result.
117138

118139
## Command line tools
119140

@@ -152,8 +173,8 @@ Describes how to create and compile a C++/CLI program that uses the .NET Framewo
152173
[Walkthrough: Compiling a C++/CX Program on the Command Line](../build/walkthrough-compiling-a-cpp-cx-program-on-the-command-line.md)
153174
Describes how to create and compile a C++/CX program that uses the Windows Runtime.
154175

155-
[Setting the Path and Environment Variables for Command-Line Builds](../build/setting-the-path-and-environment-variables-for-command-line-builds.md)
156-
Describes how to start a Command Prompt window that has the required environment variables set for command-line builds that target x86, x64, and ARM platforms by using a 32-bit or 64-bit toolset.
176+
[Set the Path and Environment Variables for Command-Line Builds](../build/setting-the-path-and-environment-variables-for-command-line-builds.md)
177+
Describes how to start a command prompt window that has the required environment variables set for command-line builds that target x86, x64, and ARM platforms by using a 32-bit or 64-bit toolset.
157178

158179
[NMAKE Reference](../build/nmake-reference.md)
159180
Provides links to articles that describe the Microsoft Program Maintenance Utility (NMAKE.EXE).

docs/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,27 @@ translation.priority.ht:
4141
- "zh-tw"
4242
---
4343
# How to: Enable a 64-Bit Visual C++ Toolset on the Command Line
44-
Visual C++ includes compilers that you can use to create apps that can run on a 32-bit, 64-bit, or ARM-based Windows operating system.
44+
45+
Visual C++ includes compilers, linkers, and other tools that you can use to create platform-specific apps that can run on 32-bit, 64-bit, or ARM-based Windows operating systems. Other optional Visual Studio workloads let you use C++ tools to target other platforms, such as iOS, Android, and Linux. The default build configuration uses 32-bit, x86-hosted tools to build 32-bit, x86-native Windows code. However, you probably have a 64-bit computer. You can take advantage of the processor and memory space available to 64-bit code by using the 64-bit, x64-hosted toolset when you build code for x86, x64, or ARM processors.
4546

4647
> [!NOTE]
4748
> For information about the specific tools that are included with each Visual C++ edition, see [Visual C++ Tools and Features in Visual Studio Editions](../ide/visual-cpp-tools-and-features-in-visual-studio-editions.md).
4849
>
4950
> For information about how to use the Visual Studio IDE to create 64-bit applications, see [How to: Configure Visual C++ Projects to Target 64-Bit Platforms](../build/how-to-configure-visual-cpp-projects-to-target-64-bit-platforms.md).
5051
51-
[!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] includes 32-bit, x86-hosted, native and cross compilers for x86, [!INCLUDE[vcprx64](../assembler/inline/includes/vcprx64_md.md)], and ARM targets. When [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] is installed on a 64-bit Windows operating system, 32-bit, x86-hosted native and cross compilers, and also 64-bit, [!INCLUDE[vcprx64](../assembler/inline/includes/vcprx64_md.md)]-hosted native and cross compilers, are installed for each target (x86, [!INCLUDE[vcprx64](../assembler/inline/includes/vcprx64_md.md)], and ARM). The 32-bit and 64-bit compilers for each target generate identical code, but the 64-bit compilers support more memory for precompiled header symbols and the Whole Program Optimization ([/GL](../build/reference/gl-whole-program-optimization.md), [/LTCG](../build/reference/ltcg-link-time-code-generation.md)) options. If you run into memory limits when you use a 32-bit compiler, try the 64-bit compiler.
52+
When you install a C++ workload in the Visual Studio installer, it always installs 32-bit, x86-hosted, native and cross compiler tools to build x86 and x64 code. If you include the Universal Windows Platform workload, it also installs x86-hosted cross compiler tools to build ARM code. If you install these workloads on a 64-bit, x64 processor, you also get 64-bit native and cross compiler tools to build x86, x64, and ARM code. The 32-bit and 64-bit tools generate identical code, but the 64-bit tools support more memory for precompiled header symbols and the Whole Program Optimization ([/GL](../build/reference/gl-whole-program-optimization.md) and [/LTCG](../build/reference/ltcg-link-time-code-generation.md)) options. If you run into memory limits when you use the 32-bit tools, try the 64-bit tools.
53+
54+
## Use a 64-bit hosted developer command prompt shortcut
5255

53-
When Visual Studio is installed on a 64-bit Windows operating system, additional Command Prompt shortcuts for the 64-bit [!INCLUDE[vcprx64](../assembler/inline/includes/vcprx64_md.md)]-native and x86 cross compilers are available. To access these command prompts on Windows 8, on the **Start** screen, open **All apps**. Under the installed version of **[!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)]**, open **Visual Studio Tools**, and then choose one of the native-tool or cross-tool command prompts. On earlier versions of Windows, choose **Start**, expand **All Programs**, **[!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)]**, **Visual Studio Tools**, and then choose a command prompt.
56+
When Visual Studio is installed on a 64-bit Windows operating system, additional developer command prompt shortcuts for the 64-bit, x64-hosted native and cross compilers are available. To access these command prompts on Windows 10, on the **Start** menu, open the folder for your version of Visual Studio, for example **Visual Studio 2017**, and then choose one of the x64 native or cross-tool developer command prompts. To access these command prompts on Windows 8, on the **Start** screen, open **All apps**. Under the heading for the installed version of Visual Studio, open the **Visual Studio** folder (in older versions of Visual Studio, it may be named **Visual Studio Tools**). On earlier versions of Windows, choose **Start**, expand **All Programs**, the folder for your version of **Visual Studio** (and on older versions of Visual Studio, **Visual Studio Tools**).
5457

55-
## Vcvarsall.bat
56-
Any of the compilers can be used on the command line by running the vcvarsall.bat command file to configure the path and environment variables that enable the compiler toolset. Because there are no Command Prompt shortcuts to enable a 64-bit toolset to target x86 or ARM platforms, use vcvarsall.bat in a Command Prompt window to use the 64-bit toolset instead. For more information, see [Setting the Path and Environment Variables for Command-Line Builds](../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
58+
## Use Vcvarsall.bat to set a 64-bit hosted build configuration
5759

58-
The following steps show how to configure a Command Prompt to use the 64-bit native toolset to target x86, x64, and ARM platforms.
60+
Any of the native or cross compiler tools build configurations can be used on the command line by running the vcvarsall.bat command file. This command file configures the path and environment variables that enable a particular build configuration in an existing command prompt window. For more information, see [Build C/C++ code on the command line](../build/building-on-the-command-line.md).
5961

60-
#### To run vcvarsall.bat to use a 64-bit toolset
62+
The following steps show how to configure a command prompt to use the 64-bit native tools to build x86, x64, or ARM code. First, change to the Visual C++ installation directory. For Visual Studio 2017, this is typically in a directory
63+
64+
### To run vcvarsall.bat to use 64-bit tools
6165

6266
1. At the command prompt, change to the Visual C++ installation directory. (The location depends on the system and the [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] installation, but a typical location is C:\Program Files (x86)\Microsoft Visual Studio *version*\VC\\.) For example, enter:
6367

docs/build/msbuild-visual-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ You can use the **MSBuild** tool to build a Visual C++ application from the comm
5151
|[How to: Modify the Target Framework and Platform Toolset](../build/how-to-modify-the-target-framework-and-platform-toolset.md)|Demonstrates how to compile a project for multiple frameworks or toolsets.|
5252

5353
## See Also
54-
[Building on the Command Line](../build/building-on-the-command-line.md)
54+
[Build C/C++ code on the command line](../build/building-on-the-command-line.md)

docs/build/nmake-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ translation.priority.ht:
3838
# NMAKE Reference
3939
The Microsoft Program Maintenance Utility (NMAKE.EXE) is a command-line tool included with [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] that builds projects based on commands that are contained in a description file.
4040

41-
To use NMAKE, you must run it in a Developer Command Prompt window. A Developer Command Prompt window has the environment variables set for the tools, libraries, and include file paths required to build at the command line. For details on how to open a Developer Command Prompt window, see [Building on the Command Line](../build/building-on-the-command-line.md).
41+
To use NMAKE, you must run it in a Developer Command Prompt window. A Developer Command Prompt window has the environment variables set for the tools, libraries, and include file paths required to build at the command line. For details on how to open a Developer Command Prompt window, see [Build C/C++ code on the command line](../build/building-on-the-command-line.md).
4242

4343
## What do you want to know more about?
4444
[Running NMAKE](../build/running-nmake.md)
@@ -58,7 +58,7 @@ The Microsoft Program Maintenance Utility (NMAKE.EXE) is a command-line tool inc
5858
[Makefile preprocessing](../build/makefile-preprocessing.md)
5959

6060
## See Also
61-
[Building on the Command Line](../build/building-on-the-command-line.md)
61+
[Build C/C++ code on the command line](../build/building-on-the-command-line.md)
6262
[C/C++ Build Tools](../build/reference/c-cpp-build-tools.md)
6363
[Creating and Managing Visual C++ Projects](../ide/creating-and-managing-visual-cpp-projects.md)
6464
[Debugging in Visual Studio](/visualstudio/debugger/debugging-in-visual-studio)

docs/build/reference/link-environment-variables.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ The LINK tool uses the following environment variables:
4949
- TMP, to specify a directory when linking OMF or .res files.
5050

5151
## See Also
52-
[Setting Linker Options](../../build/reference/setting-linker-options.md)
53-
[Linker Options](../../build/reference/linker-options.md)
54-
[Setting the Path and Environment Variables for Command-Line Builds](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md)
52+
53+
[Setting Linker Options](../../build/reference/setting-linker-options.md)
54+
[Linker Options](../../build/reference/linker-options.md)
55+
[Build C/C++ code on the command line](../build/building-on-the-command-line.md)
56+
[Set the Path and Environment Variables for Command-Line Builds](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md)

0 commit comments

Comments
 (0)