75
Separate Compilation
5
This chapter describes how to compile Pascal programs in separate units.
Chapter 4, “Program Construction and Management,” gives an introduction to
the concepts in this chapter. Following are the sections:
In separate compilation, a program is divided into several units that can be
separately compiled into object (
.o
) files. The object files are then linked using
pc
, which invokes
pc3
to check for the consistent use of global names and
declarations across the different units, and then invokes
ld
(1) to link and load
the units. You can also give
pc
the names of all the units at once, in which case
pc
compiles all the units, checks for consistency, and links the units in one
step.
Separate compilation is different from independent compilation. In
independent compilation, you invoke
ld
directly, so there is no consistency
checking. Independent compilation is not addressed in this guide.
Working with Units
Pascal provides two types of source files or units: the program unit and the
module unit.
Working with Units
page 75
Sharing Variables and Routines Across Multiple Units
page 76
Sharing Declarations in Multiple Units
page 87
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......