Languages::C++::Visual Studio::Building

PIC Lab



.exe files

Because C++ is a compiled (rather than interpreted) language, you must build your source code (.cpp files) into object code (.obj files), then link that into executable code (.exe file) before it can actually be run. Visual C++ .NET automates these tasks for you in many ways.

Compile: To turn a single source file into an object file. Use the compile object from the Build menu to check the current .cpp file for errors. Only compile-time errors will be detected. This file will be automatically saved. Note that header files (.h) cannot be compiled.

Build: To turn all the source files in the project into object files and link those object files into an executable. The files will all be saved (including .h files) and any error within the code, including linker errors, will be detected. Your .exe file can be found in the Debug folder within the project folder. You may need to submit this file with your cpp files if the professor requires it.

Execute: To Run the already built .exe file. If you have made changes since you last selected Build, Visual C++ will prompt you to build the new version. If you say yes, your changes will be saved and a new .exe file will be created to overwrite the old one. If you say no, the old .exe file will be executed and no saving or building will be done.


Feedback
PIC Lab home
up one level
UCLA Department of Mathematics
Program in Computing - PIC Lab
2817 Boelter Hall / 310-825-7267
This page last updated: June 28, 2001