pTAL Reference Manual (H06.03+)
Compiling and Linking pTAL Programs
HP pTAL Reference Manual—523746-005
16-2
Compiling Source Files
Topics:
•
Compiling Source Files on page 16-2
•
Linking Object Files on page 16-7
•
Creating a Dynamic Linked Library (DLL) on page 16-12
•
Compiling With Global Data Blocks on page 16-12
•
Compiling With Saved Global Data on page 16-17
Compiling Source Files
The compiler reads input files, produces output files, and uses swap files and
temporary files as needed. On Guardian platforms, you use HP TACL commands to
compile source files. The compiler accepts information you specify in HP TACL
commands (DEFINE, PARAM, and ASSIGN) if you issue them before you run the
compiler. For a summary of HP TACL commands, see Appendix B, Disk File Names
and HP TACL Commands.
The compiler reads input only from a single edit-format disk file. You can use the
SOURCE on page 17-58 in this input file to read code from other source files during
compilation. The input file and code read from other source files comprise a
compilation unit.
In general, the compiler opens each source file as it needs the source file and keeps
the source file open until the end of the compilation. This behavior ensures that the
contents of the file cannot change between the time the compiler reads the file and
creates a listing. You can open a source file for read access, but generally not for write
access, while the source file is compiling.
When the number of files read exceeds the maximum number of files that Guardian
allows to be open, the compiler closes the least recently used file (unless that file is the
primary source file, which is always kept open) in order to continue to open and read
source files.
If you edit a file before the compiler creates an output listing, the source code in the
listing will not match the code in the source file. The compiler reports a warning if it
discovers that part of a source file has changed. Do not alter the source files until the
compilation ends.
Note. The remainder of this section applies only to Guardian platforms. To compile and link
pTAL programs on Windows platforms, see Section 18, pTAL Cross Compiler
.
Example 16-1. Compiler Command Lines
ptal / in test, out $s.#test, nowait/ testobj; symbols
eptal / in test, out $s.#test, nowait/ testobj; symbols










