1

I have the source code for a software project and I want to compile that to an .exe file.

The project was built with Visual Studio, how can I compile it on my machine?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311

1 Answers1

6

Install Visual Studio

  1. Download Visual Studio 2013 Community Edition and run the installer.

    enter image description here

    When using a browser that doesn't allow you to directly run the downloaded file, save vs_community.exe to your hard drive and then execute the file manually. By default, most browsers store downloads in %USERPROFILE%\Downloads.

  2. In the installer, you need to agree to the License Terms and Privacy Policy and then click Next to install Visual Studio 2013.

    enter image description here

  3. Select optional components to install, then click INSTALL.

    To compile "plain, old C++ programs", you won't need any of the optional components. When in doubt, don't install them now, you can also install these components later, when you need them (by running the installer again).

  4. After installation, LAUNCH Visual Studio and configure it to your preference on the first run.

Compile the project

  1. Open the project by using the Open Project… link on the Start Page or using the menu option FILEOpenProject/Solution….

    In the resulting dialog, navigate to the project folder and open the .sln Visual Studio Solution.

  2. Use the menu option BUILDBuild Solution to compile the project.

    To find the location of the resulting executable, check the Output panel (if it's not visible, open it with the menu option VIEWOutput).

    enter image description here

    If you want to build a different configuration, select it from the configuration dropdown and repeat the process.
    For everyday use, you're usually going to want to use the Release configuration, if one exists.

    enter image description here

    Note that different configurations write their executables to different output directories.

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311