Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (c) c89(1)
The order of specifying the -I and -L ags is signicant.
Quotation marks around string values in ags are optional but recommended to avoid errors
caused by shell substitutions or deletions.
Refer to the C/C++ Programmers Guide for details.
DESCRIPTION
c89 is the driver program for the native C and C++ language compilation system. This reference
page describes using c89 in the OSS environment.
c89 performs simple validation of the ags and operands from the arguments on its command
line and, depending on those arguments, invokes components of the language compilation sys-
tem. c89 does not verify the existence of les it passes to compilation system components. It
does verify that the operand sufx identies a valid operand to pass to compilation system com-
ponents. c89 and the components it runs issue messages to the standard error le.
c89 performs the following steps:
1. If the corresponding -W ag is specied, invokes an SQL preprocessor to process any
embedded SQL statements in C or C++ source les, creating C only, C++ only, or
module denition les as appropriate.
2. Compiles any specied C and C++ source les or source les produced by Step 1 into
object les.
3. If the -Wmxcmp ag is specied, invokes the NonStop SQL/MX compiler to process
les created by Step 1 or specied as module denition les in the command.
4. Links the object les together with any libraries specied on the command line. (This
occurs if no ags that prevent linking are specied and the source les are compiled
without errors.)
5. If the -Wsqlcomp ag is specied, invokes the NonStop SQL/MP compiler to process
les created by Step 1 or specied in the command.
6. Writes an executable object le or library to the le specied by a -o ag (if present) or
to the le a.out.
Libraries can be:
Archives, with a sufxof.a
DLLs, with a sufxof.so
TNS/R native user libraries
TNS/R native SRLs, with a sufxof.srl
The default executable le in the Guardian le system is aout in the subvolume from which c89
is invoked.
If only a single source le is given and no ags that suppress linking are specied, then the le is
compiled into an object le and linked into an executable object le. If the executable le is
created successfully, the object le is removed.
c89 places object les (loadles) in the current working directory with the same base name as the
corresponding source le, but with a sufxof.o.
c89 also names several temporary or intermediate les that are created during the compilation
process. Like the output object le, c89 places these les in the current working directory. c89
removes these temporary or intermediate les unless the -Wsavetemps ag is specied.
527188-003 Hewlett-Packard Company 219