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-4
Working in the Guardian Environment
programs. If you do not compile using header files, the Binder cannot correctly resolve
external references to Guardian C and OSS functions.
Working in the Guardian Environment
In the Guardian environment, you can compile, bind, and accelerate C programs for
either the Guardian or G-series Open System Services (OSS) environment. In the
Guardian environment, you use the C compiler, the Binder (the BIND program), and
the Accelerator (the AXCEL program) or OCA to develop your applications.
Compiling a C Module
The C compiler translates the source text of a module and produces the following:
An extensive compiler listing. Several pragmas enable you to control the content of
this compiler listing.
A nonexecutable object file, provided that the compiler encountered no errors
during the compilation. If your C program comprises only a single module, use the
RUNNABLE pragma to direct the compiler to produce a program file instead of a
nonexecutable object file.
After compiling all the modules that compose your C program, use Binder to collect
and combine them into a program file (an executable object file).
To compile a module, you start the C compiler process using the TACL command RUN
as shown in the following diagram:
[ RUN ] C
is the TACL command to start the C compiler process. Note that the command
keyword RUN is optional.
IN source
specifies the primary source file of the module.
[ RUN ] C / IN source [ , OUT listing ] [ , run-options ] /
[ object ] [ ; compile-option [ , compile-option ]... ]
compile-option:
{ pragma }
{ define identifier [ integer-constant ] }
{ undefine identifier }