Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (c) c89(1)
The order of specifying the -I and -L flags is significant.
Quotation marks around string values in flags are optional but recommended to avoid errors
caused by shell substitutions or deletions.
Refer to the C/C++ Programmer’s 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 flags 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 files it passes to compilation system components. It
does verify that the operand suffix identifies a valid operand to pass to compilation system com-
ponents. c89 and the components it runs issue messages to the standard error file.
c89 performs the following steps:
1. If the corresponding -W flag is specified, invokes an SQL preprocessor to process any
embedded SQL statements in C or C++ source files, creating C only, C++ only, or
module definition files as appropriate.
2. Compiles any specified C and C++ source files or source files produced by Step 1 into
object files.
3. If the -Wmxcmp flag is specified, invokes the NonStop SQL/MX compiler to process
files created by Step 1 or specified as module definition files in the command.
4. Links the object files together with any libraries specified on the command line. (This
occurs if no flags that prevent linking are specified and the source files are compiled
without errors.)
5. If the -Wsqlcomp flag is specified, invokes the NonStop SQL/MP compiler to process
files created by Step 1 or specified in the command.
6. Writes an executable object file or library to the file specified by a -o flag (if present) or
to the file a.out.
Libraries can be:
• Archives, with a suffixof.a
• DLLs, with a suffixof.so
• TNS/R native user libraries
• TNS/R native SRLs, with a suffixof.srl
The default executable file in the Guardian file system is aout in the subvolume from which c89
is invoked.
If only a single source file is given and no flags that suppress linking are specified, then the file is
compiled into an object file and linked into an executable object file. If the executable file is
created successfully, the object file is removed.
c89 places object files (loadfiles) in the current working directory with the same base name as the
corresponding source file, but with a suffixof.o.
c89 also names several temporary or intermediate files that are created during the compilation
process. Like the output object file, c89 places these files in the current working directory. c89
removes these temporary or intermediate files unless the -Wsavetemps flag is specified.
527188-003 Hewlett-Packard Company 2−19