View Menu

Chapter 2 - A Quick Start Using the IDE

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Build Menu
The options in the Build Menu provide access to the IDE features that are involved in actual code generation, debugging, and running your program (see Figure 2-7).
Figure 2-7: The Visual C++ Build menu
Compile
Choosing this option instructs the IDE to compile the active window’s contents. Compiling in this sense is asking the environment to check the syntax of the active file—for example, C or C++ source code.
Build
Typical C/C++ programs are comprised of many files. Some of these files may be supplied by the compiler, the operating system, the programmer, or even third-party vendors. It can get even more complicated if the project’s files are created by several programming teams. Because there can be so many files, and because the compile process can take a very long time, the Build menu item becomes an extremely useful tool. Build examines all of the files in the project and then compiles and links only those dependent files displaying dates and times more recent than the project’s executable file.
One decision you must make when selecting Build is whether the resulting file is to include debugging information (Debug mode) or not (Release mode). These modes are selected from the Project | Settings... menu item. Once you have a program up and running, you should usually choose a Build without the Debug option, since inclusion of the information makes the resulting executable file unnecessarily large.
If the Build process detects any syntax errors, either nonfatal warnings or fatal errors, these are displayed in the Output window. Use the Next Error or Previous Error menu items to search forward or backwards through this list.
If you have the toolbar visible, you can use the sixth button from the right to invoke Build. This button has a picture that looks like a bucket with two dark-colored, downward-pointing arrows on it.
Rebuild All
The only difference between Build and Rebuild All is that Rebuild All ignores the dates of all of a project’s files and painstakingly compiles and links all of them.
Imagine the following scenario. Your company, for the sake of economy, has decided to go without any systems maintenance personnel. This decision, coupled with the seasonal time change, system down time, and so on, results in your discovery that the systems on your network all have different system clock settings. Because of this, newly created files are being stamped with the previous day’s date! Choosing the Build option in this case could leave these current, updated files out of the final executable file. However, by choosing Rebuild All, you avoid any date/time stamp checks, creating an executable file that truly reflects the current state of all included files.
If the Rebuild All process detects any syntax errors, either nonfatal warnings or fatal errors, these are displayed in the Output window. Use the Next Error or Previous Error menu items to search forward or backwards through this list.
If you have the toolbar visible, you can use the fifth button from the right to invoke Rebuild All. This button has a picture that looks like a bucket with three light-colored, downward-pointing arrows on it.
Batch Build...
This option is similar to the Build menu item except that it builds multiple project targets.
Clean
With the Clean command you can easily remove all files from the intermediate directories in any project configuration in your project workspace. Removing the files forces the development environment to build these files if you subsequently click the Build command.
Update All Dependencies...
Choosing this option instructs the IDE to read the compiler-generated dependencies and to scan non-C/C++ source files for dependencies. Therefore, the dependency information for C/C++ files will not reflect any changes made since the last build.
Start Debug
Unlike a full-speed program execution, this option instructs the IDE to begin executing your program line by line, or up to any set breakpoint.
Debugger Remote Connection...
After you have configured a connection on both ends, you can begin remote debugging by choosing this option.
Execute
Once you have built your project with 0 errors, the Execute command allows you to run the program at full speed.
Set Active Configuration...
With large projects being combinations of many subprojects, you need to instruct the Build or Rebuild command as to which project’s executable needs creation. The Set Active Configuration... command performs this task.
Configurations...
The Configurations... option allows you to add or remove configurations from the active build cycle. For example, you may have begun with only a debug configuration and now wish to add a release version.
Profile...
This option is only available under the Professional and Enterprise Editions. Before using the profiler, you must build the current project with profiling enabled. If you want to perform function profiling only in the current project, you only need to enable profiling for the linker. If you want to do line profiling, you also need to include debugging information.
You use the Profiler to examine the runtime behavior of your programs. The Profiler allows you to determine which sections of your code are working efficiently by producing information showing areas of code that are not being executed or that are taking a long time to execute.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

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