locked
How do I create a stand alone .exe in Visual Studio Express???

    Question

  •  

    I've downloaded the Visual Studio 9.0 Express to program in c++.

     

    I have created a win32 console application and I now need to be able to have a .exe file I can move around to other computers and have it run on them.  I have tried to create release and debug versions of solutions and then copying the .exe file found in the debug folder.  But when I try to run the program on a different computer I get an error message telling me that the application failed to start b/c the application configuration was incorrect.

     

    I've searched around and haven't found a solution to my problem.  I downloaded the microsoft net framework 3.0 but that did nothing as well.

     

    Does anyone have a solution for this?

    Tuesday, October 30, 2007 3:38 AM

All replies

  • I don't have VS Express, but I'll go with the most obvious answer given my experience with VS Pro.

    The debug builds require debug versions of libraries (MFC, C-Runtime, etc) which you won't find on a typical computer, only those that have Visual Studio installed, so you can't just take the exe built with the debug configuration (from the debug folder).

     

    So, since you're able to create an exe in the debug configuration you should be able to do so with the release configuration. Just change your configuration to release and build. The exe will be in the Release folder.

     

    Again, I don't have express, so I'm not even sure if this is possible.

     

     

    Tuesday, October 30, 2007 1:46 PM
  •  IMWakko wrote:
    So, since you're able to create an exe in the debug configuration you should be able to do so with the release configuration. Just change your configuration to release and build. The exe will be in the Release folder.

    I think what the poster is wondering about is about the release exectuable, but how to produce a stand-alone executable. It is not enough to simply compile it there, since the error message that the "Application configuration is incorrect" will remain. This error is due to a dependency on the Visual C++ runtime that should be installed by the Visual C++ Runtime Installer first. If you don't want to do this, I'm not sure, but maybe an option is to statically link it into your exe file? This is nothing I've tried though.
    Wednesday, November 07, 2007 1:07 PM