Yahoo Web Search

Search results

  1. People also ask

  2. Apr 14, 2017 · New in the most recent version of Visual Studio, there is menu View Terminal, which will open a PowerShell instance as a Visual Studio dockable window, rather than a floating PowerShell or CMD instance from the Developer Command Prompt.

    • how do i open a command prompt in visual c++ 20191
    • how do i open a command prompt in visual c++ 20192
    • how do i open a command prompt in visual c++ 20193
    • how do i open a command prompt in visual c++ 20194
    • how do i open a command prompt in visual c++ 20195
    • Overview
    • Download and install the tools
    • How to use the command-line tools
    • Path and environment variables for command-line builds
    • Developer command prompt shortcuts
    • Developer command file locations
    • Use the developer tools in an existing command window
    • Create your own command prompt shortcut
    • Command-line tools
    • Command-line project management tools

    You can build C and C++ applications on the command line by using tools that are included in Visual Studio. The Microsoft C++ (MSVC) compiler toolset is also downloadable as a standalone package. You don't need to install the Visual Studio IDE if you don't plan to use it.

    If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see Install C++ support in Visual Studio. If you only want the command-line toolset, download the Build Tools for Visual Studio. When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the Desktop development with C++ workload. You can select optional libraries and toolsets to include under Installation details. To build code by using the Visual Studio 2015, 2017, or 2019 toolsets, select the optional MSVC v140, v141, or v142 build tools. When you're satisfied with your selections, choose Install.

    If you've installed Visual Studio and a C++ workload, you have all the command-line tools. For information on how to install C++ and Visual Studio, see Install C++ support in Visual Studio. If you only want the command-line toolset, download the Build Tools for Visual Studio 2017. When you run the downloaded executable, it updates and runs the Visual Studio Installer. To install only the tools you need for C++ development, select the Visual C++ build tools workload. You can select optional libraries and toolsets to include under Installation details. To build code by using the Visual Studio 2015 toolset, select the optional MSVC v140 build tools. When you're satisfied with your selections, choose Install.

    When you choose one of the C++ workloads in the Visual Studio Installer, it installs the Visual Studio platform toolset. A platform toolset has all the C and C++ tools for a specific Visual Studio version. The tools include the C/C++ compilers, linkers, assemblers, and other build tools, and matching libraries and header files. You can use all of these tools at the command line. They're also used internally by the Visual Studio IDE. There are separate x86-hosted and x64-hosted compilers and tools to build code for x86, x64, ARM, and ARM64 targets. Each set of tools for a particular host and target build architecture is stored in its own directory.

    To work correctly, the tools require several specific environment variables to be set. These variables are used to add the tools to the path, and to set the locations of include files, library files, and SDKs. To make it easy to set these environment variables, the installer creates customized command files, or batch files, during installation. You can run one of these command files to set a specific host and target build architecture, Windows SDK version, and platform toolset. For convenience, the installer also creates shortcuts in your Start menu. The shortcuts open developer command prompt windows by using these command files for specific combinations of host and target. These shortcuts ensure all the required environment variables are set and ready to use.

    The required environment variables are specific to your installation and to the build architecture you choose. They also might be changed by product updates or upgrades. This variability is one reason why we recommend you use an installed command prompt shortcut or command file, instead of setting the environment variables yourself.

    The toolsets, command files, and shortcuts installed depend on your computer processor and the options you selected during installation. The x86-hosted tools and cross tools that build x86 and x64 code are always installed. If you have 64-bit Windows, the x64-hosted tools and cross tools that build x86 and x64 code are also installed. If you choose the optional C++ Universal Windows Platform tools, then the x86 and x64 tools that build ARM and ARM64 code also get installed. Other workloads may install these and other tools.

    The MSVC command-line tools use the PATH, TMP, INCLUDE, LIB, and LIBPATH environment variables, and also use other environment variables specific to your installed tools, platforms, and SDKs. Even a simple Visual Studio installation may set twenty or more environment variables. This complexity is why we strongly recommend that you use a developer command prompt shortcut or one of the customized command files. We don't recommend you set these variables in the Windows environment yourself.

    To see which environment variables are set by a developer command prompt shortcut, you can use the SET command. Open a plain command prompt window and capture the output of the SET command for a baseline. Open a developer command prompt window and capture the output of the SET command for comparison. Use a diff tool such as the one built into Visual Studio to highlight the environment variables set by the developer command prompt. For more information about the compiler and linker environment variables, see CL environment variables.

    The command prompt shortcuts are installed in a version-specific Visual Studio folder in your Windows Start menu. Here's a list of the base command prompt shortcuts and the build architectures they support:

    •Developer Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.

    •x86 Native Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 32-bit, x86-native code.

    •x64 Native Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 64-bit, x64-native code.

    •x86_x64 Cross Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 64-bit, x64-native code.

    •x64_x86 Cross Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 32-bit, x86-native code.

    If you prefer to set the build environment in an existing command prompt window, you can use one of the command files created by the installer. We recommend you set the environment in a new command prompt window. We don't recommend you later switch environments in the same command window.

    The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in \Program Files\Microsoft Visual Studio\2022\ . The may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.

    The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2019, the typical installation location on a 64-bit system is in \Program Files (x86)\Microsoft Visual Studio\2019\ . The may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.

    The command file location depends on the version of Visual Studio you installed, and on choices you made during installation. For Visual Studio 2017, the typical installation location on a 64-bit system is in \Program Files (x86)\Microsoft Visual Studio\2017\ . The may be Community, Professional, Enterprise, BuildTools, or another nickname you supplied.

    The command file location depends on the Visual Studio version, and the installation directory. For Visual Studio 2015, the typical installation location on a 64-bit system is in \Program Files (x86)\Microsoft Visual Studio 14.0.

    The primary developer command prompt command file, VsDevCmd.bat, is located in the Common7\Tools subdirectory. When no parameters are specified, it sets the environment to use the x86-native tools to build 32-bit x86 code.

    The simplest way to specify a particular build architecture in an existing command window is to use the vcvarsall.bat file. Use vcvarsall.bat to set environment variables to configure the command line for native 32-bit or 64-bit compilation. Arguments let you specify cross-compilation to x86, x64, ARM, or ARM64 processors. You can target Microsoft Store, Universal Windows Platform, or Windows Desktop platforms. You can even specify which Windows SDK to use, and select the platform toolset version.

    When used with no arguments, vcvarsall.bat configures the environment variables to use the current x86-native compiler for 32-bit Windows Desktop targets. You can add arguments to configure the environment to use any of the native or cross compiler tools. vcvarsall.bat displays an error message if you specify a configuration that's not installed, or not available on your computer.

    Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the x64 Native Tools Command Prompt for VS 2019 shortcut is something similar to:

    %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

    Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the x64 Native Tools Command Prompt for VS 2017 shortcut is something similar to:

    %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"

    Open the Properties dialog for a developer command prompt shortcut to see the command target used. For example, the target for the VS2015 x64 Native Tools Command Prompt shortcut is something similar to:

    %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

    To build a C/C++ project at a command prompt, Visual Studio provides these command-line tools:

    CL

    Use the compiler (cl.exe) to compile and link source code files into apps, libraries, and DLLs.

    Link

    Use the linker (link.exe) to link compiled object files and libraries into apps and DLLs.

    When you build on the command line, the F1 command isn't available for instant help. Instead, you can use a search engine to get information about warnings, errors, and messages. You can also download and use the offline help files. To use the search in Microsoft Learn, enter your query in the search box at the top of any article.

    By default, the Visual Studio IDE uses native project build systems based on MSBuild. You can invoke MSBuild directly to build projects without using the IDE. You can also use the devenv command to use Visual Studio to build projects and solutions. Visual Studio also supports build systems based on CMake or NMake.

    MSBuild

    Use MSBuild (msbuild.exe) and a project file (.vcxproj) to configure a build and invoke the toolset without loading the Visual Studio IDE. It's equivalent to running the Build project or Build Solution command in the Visual Studio IDE. MSBuild has advantages over the IDE when you build at the command line. You don't have to install the full IDE on all your build servers and build pipelines. You avoid the extra overhead of the IDE. MSBuild runs in containerized build environments, and supports a binary logger.

    DEVENV

    Use DEVENV (devenv.exe) combined with a command-line switch such as /Build or /Clean to execute certain build commands without displaying the Visual Studio IDE.

    CMake

  3. Aug 11, 2023 · Start from the Tools > Command Line menu. Select the Visual Studio Developer Command Prompt, Developer PowerShell, or terminal to use .NET and C++ tools more easily.

    • how do i open a command prompt in visual c++ 20191
    • how do i open a command prompt in visual c++ 20192
    • how do i open a command prompt in visual c++ 20193
    • how do i open a command prompt in visual c++ 20194
  4. Apr 14, 2020 · In my case it is named x64 Native Tools Command Prompt for VS 2019 and I can find it using the following sequence: Press Windows key. Release Windows key. Type x64. The following screen appears: You can also find shortcuts for VS 2019 Command Prompts (x86/x64, Native/Cross) here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual ...

  5. Check your Microsoft Visual C++ installation. To use MSVC from a command line or VS Code, you must run from a Developer Command Prompt for Visual Studio. An ordinary shell such as PowerShell, Bash, or the Windows command prompt does not have the necessary path environment variables set.

    • 1.90
  6. Oct 25, 2020 · From the Windows Start menu, find Visual Studio 2019 x64 Native Tools Command Prompt for VS 2019 and right click on it, chose More and select Open file location. This will open a folder in Windows Explorer, typically this folder will contain a couple of links to cmd.exe customized for development usage.

  7. May 9, 2022 · This walkthrough shows how to create a basic, "Hello, World"-style C program by using a text editor, and then compile it on the command line. If you'd rather work in C++ on the command line, see Walkthrough: Compiling a Native C++ Program on the Command Line.

  1. People also search for