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?

4
  • You've created this question just for reference purposes right? So that the frail Google-ooglers can easily stumble upon such great wisdom?
    – MonkeyZeus
    Dec 24, 2014 at 17:45
  • @MonkeyZeus Partly, yes. I wanted to explain the process so that I can reference it in another post. Others are welcome to post alternatives though. Dec 24, 2014 at 17:49
  • I have nothing against it, I was merely surprised that at almost 44k rep you needed to ask such a question lol but then I thought about it a little harder and I came to that conclusion. I upvoted both because you did a great job with this =)
    – MonkeyZeus
    Dec 24, 2014 at 17:51
  • @MonkeyZeus Have a look at blog.stackoverflow.com/2012/05/encyclopedia-stack-exchange Dec 24, 2014 at 18:47

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .