Building on the Command Line
You can build C and C++ applications on the command line by using tools that are included in Visual Studio. Every edition of Visual Studio installs a command-line toolset that includes a compiler, linker, and other build tools, and a command file that sets the required build environment. By default, these tools are installed in drive:\Program Files (x86)\Microsoft Visual Studio version\VC\bin\. (The actual directory on your computer depends on the system, the Visual Studio version, and your installation choices.)
To work correctly, the Visual C++ command-line tools require several environment variables that are customized for your installation. When Visual Studio is installed, it creates a vcvarsall.bat command file that you can run to set the required environment variables. It also creates a shortcut that starts a Developer Command Prompt window in which these variables are already set. These environment variables are specific to your installation, and might be changed by product updates or upgrades. Therefore, we recommend that you use vcvarsall.bat or a Developer Command Prompt shortcut instead of setting them yourself. For more information, see Setting the Path and Environment Variables for Command-Line Builds.
To open a Developer Command Prompt window
On the Windows 8 Start screen, enter Visual Studio Tools. Notice that the search results change as you type; when Visual Studio Tools appears, choose it.
On earlier versions of Windows, choose Start, and then in the search box, enter Visual Studio Tools. When Visual Studio Tools appears in the search results, choose it.
In the Visual Studio Tools folder, open the Developer Command Prompt for your version of Visual Studio.
To build a C/C++ project on the command line, you can use these Visual C++ command-line tools:
When you build on the command line, you can get information about warnings, errors, and messages by starting Visual Studio and then on the menu bar, choosing Help, Search.