C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

5> BIND
After starting Binder, you enter Binder commands to combine your object files and C run-time
library object files to produce a program file. This diagram illustrates the Binder commands you
can use to perform this task:
SELECT CHECK PARAMETER OFF
SET SYSTYPE environment
SET FILESYS file-system
ADD * FROM main-obj-file
ADD * FROM obj-file
SELECT SEARCH model-dependent-library-file
SELECT RUNNABLE OBJECT ON
SELECT LIST * OFF
SET HEAP value PAGES
BUILD program-file
SELECT CHECK PARAMETER OFF
disables checking of parameter number, type, and mode (value or reference) and of function
return type across code blocks. If you do not disable these checks, Binder might generate
several extraneous warning messages because C does not require functions to be declared
before they are called.
SET SYSTYPE environment
specifies the execution environment for the program, either GUARDIAN for the Guardian
environment or OSS for the G-series OSS environment. The default setting is GUARDIAN.
SET FILESYS file-system
specifies the file system used by Binder to resolve partially qualified file names, either GUARDIAN
for the Guardian environment or OSS for the G-series OSS environment. If you specify
GUARDIAN, Binder resolves file names with respect to the default volume and subvolume. If
you specify OSS, Binder resolves file names with respect to the current working directory. The
default setting is GUARDIAN.
ADD * FROM main-obj-file
adds the object file of your program’s main module. The main module is the one that contains
the definition of the function main().
ADD * FROM obj-file
adds the object file of one of your program’s other modules. You must repeat this command
for each of your modules.
SELECT SEARCH model-dependent-library-file
directs Binder to search the specified model-dependent library file when resolving external
references. You choose the model-dependent library file depending on the execution
environment, the data model, and the memory model of your program. For more details on
selecting the correct model-dependent library file, see Specifying Library Files (page 266).
The model-dependent-library-file file name must be fully qualified. The files are
located in $SYSTEM.SYSTEM by default.
SELECT RUNNABLE OBJECT ON
directs Binder to create an executable object file (a program file) when it builds the object file.
SELECT LIST * OFF
disables generation of load maps and cross-reference listings.
SET HEAP value PAGES
specifies the heap size of the program.
BUILD program-file
directs Binder to build a program file using the files and options specified in the preceding
commands. program-file is the name of the program file that Binder builds.
Working in the Guardian Environment 265