CREATING A STANDALONE EXECUTABLE


All the sample applications you have created so far have worked within the Visual C++ IDE. This version of your application is referred to as the debug version. Debug versions are meant to allow you to test your application. However, when you are ready to officially release your application, you want to give users a standalone program designed to be run by itself, outside of the IDE. This requires that you generate a release version of your application (also sometimes called a runtime version).

Trick 

The executable file that Visual C++ creates and stores in the Debug folder of your project is not optimized for normal execution. It includes information that allows Visual C++ to provide hints and help on how the program is running. When the application is running outside of the Visual C++ IDE, this information is unnecessary and can even slow down your program in some cases. So although you can distribute this executable file, the release is often smaller and more efficient.

When you are ready to generate the release version of your application, you need to change its build configuration options. You do this by selecting Configuration Manager from the Build menu. Figure 3.20 shows the dialog box that appears. To create a release build, select Release from the Active Solution Configuration drop-down list. Then select Rebuild Solution from the Build menu. In your project's folder, you will have both a Release and a Debug folder. Inside it is a version of your application that can be released to others.

image from book
Figure 3.20: The Configuration Manager allows you to build debug or release versions of your application.




Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
ISBN: 735615381
EAN: N/A
Year: 2005
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net