T7-The Visual C++ Components
T7-The Visual C++ Components
T7-The Visual C++ Components
11/04/21 1
11/04/21 2
The Visual C++ Components
11/04/21 3
VC++ Components
• Components:
The Project
The Resource Editors—Workspace ResourceView
The C/C++ Compiler
The Source Code Editor
The Resource Compiler
The Linker
The Debugger
AppWizard
Classwizard
• overview of the Visual C++ application build process.
11/04/21 4
Microsoft Visual C++ 6.0 and the Build Process
• Visual C++ 6.0 in action.
• what is a project?
• A project is a collection of interrelated source files that are
compiled and linked to make up an executable Windows-based
program or a DLL.
• Source files for each project are generally stored in a separate
subdirectory.
• A project depends on many files outside the project subdirectory
too, such as include files and library files.
A makefile stores compiler and linker options and expresses all the
interrelationships among source files.
A make program reads the makefile and then invokes the compiler,
assembler, resource compiler, and linker to produce the final
output, which is generally an executable file.
11/04/21 5
Contd…
• In a Visual C++ 6.0 project, there is no makefile (with an MAK
extension) unless you tell the system to export one.
11/04/21 6
VC++ Project Files
Visual C++ creates some intermediate files too
• The resource editors can also process EXE and DLL files, so you can
use the clipboard to "steal" resources, such as bitmaps and icons,
from other Windows applications.
11/04/21 8
The C/C++ Compiler
• The Visual C++ compiler can process both C source code and C++ source
code.
• A C extension indicates C source code, and CPP or CXX indicates C++ source
code.
• The compiler is compliant with all ANSI standards, including the latest
recommendations of a working group on C++ libraries, and has additional
Microsoft extensions.
• The C++ Standard Template Library (STL) is also included, although it is not
integrated into the MFC library.
11/04/21 9
The Other Components
• The Source Code Editor
Visual C++ 6.0 includes a sophisticated source code editor that
supports many features such as dynamic syntax coloring, auto-
tabbing, keyboard bindings
• The Linker
The linker reads the OBJ and RES files produced by the C/C++
compiler and the resource compiler, and it accesses LIB files for
MFC code, runtime library code, and Windows code. It then writes
the project's EXE file.
11/04/21 10
The Debugger
• The Visual C++ debugger has been steadily improving, but it
doesn't actually fix the bugs yet. The debugger works closely with
Visual C++ to ensure that breakpoints are saved on disk.
11/04/21 11
AppWizard
• AppWizard
AppWizard is a code generator that creates a
working skeleton of a Windows application
with features, class names, and source code
filenames that you specify through dialog
boxes.
AppWizard code is minimalist code; the
functionality is inside the application
framework base classes.
AppWizard gets you started quickly with a
new application.
11/04/21 12
ClassWizard
• ClassWizard
ClassWizard is a program (implemented as a DLL)
that's accessible from Visual C++'s View menu.
11/04/21 13