C/C++ Programmer's Guide (G06.25+)

Compiling, Binding, and Accelerating TNS C
Programs
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
14-7
Binding a C Module
After starting Binder, you enter Binder commands to combine your object files and
C run-time library object files to produce a program file. The following diagram
illustrates the Binder commands you can use to perform this task:
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 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