HP C/iX Reference Manual (31506-90011)
112 Chapter8
Compiling and Running HP C/iX Programs
Compiling HP C/iX Programs
Compiling HP C/iX Programs
You can compile HP C/iX programs using the MPE/iX commands CCXL, CCXLLK or
CCXLGO, or by explicitly running the CCOMXL.PUB.SYS program.
CCXL Command
The CCXL command invokes the HP C/iX compiler and generates an object file.
Syntax
CCXL
[textfile] [,[objectfile] [,[listfile]] [
;INFO="options"]
Parameters
textfile
is the source file that the HP C/iX compiler reads. If omitted, the default is
$STDIN.
objectfile
is the relocatable object file to which the compiler writes the object code. If
omitted, the default is $NEWPASS.
listfile
is the listing file. If omitted, the default is $STDLIST.
options are compiler options you want to take effect; separate options with a
blank. See "HP C/iX Compiler Options" later in this chapter for specific
options.
Description
If you omit
textfile
, the current input device, $STDIN, is used by default. Typically, the
terminal is the standard input device, and this allows you to enter source code
interactively. Indicate the end of the interactive session by entering a colon (:).
If you omit
listfile
, the standard listing file, $STDLIST, is used by default. Typically, a
listing is sent to the terminal during a terminal session or to the printer in a batch job. If
listfile
is a file other than $STDLIST, the compiler writes errors and warnings to
$STDLIST and
listfile
.
Examples
CCXL MYTEXT,,MYLIST
This example compiles the HP C/iX source file MYTEXT, puts the object code in $NEWPASS
(by default), and writes the list file to MYLIST.
CCXL MYTEXT,MYOBJ;INFO="-Ddebug -v"
This example compiles the source file MYTEXT, places the object code in the file MYOBJ,
sends the list file to the terminal, and passes two options to the compiler. The -Ddebug
option defines debug as if it were defined using the #define preprocessor statement and
has the value of 1. The -v option echoes the different stages of processing the source file
goes through during compilation.