HP C A.06.05 Reference Manual

Compiling and Running HP C Programs
Compiling HP C Programs
Chapter 9222
cc +DD64 +Z -c prog.c
compiles prog.c for use in a large shared library or executable in 64-bit mode.
cc +DD32 +z -c prog.c
compiles prog.c in 32-bit mode for use in a shared library with less than 16K of symbols.
cc +DD64 prog.c
compiles prog.c in 64-bit mode.
Refer to the discussion on optimization options in the C online help or the HP C/HP-UX
Programmer’s Guide for more information.
Environment Variables
This section describes the following environment variables you can use to control the C
compiler:
CCOPTS Environment Variable
CCROOTDIR Environment Variable
TMPDIR Environment Variable
aCC_MAXERR Environment Variable
CCOPTS Environment Variable
You can pass arguments to the compiler using the CCOPTS environment variable or include
them on the command line. The CCOPTS environment variable provides a convenient way for
establishing default values for cc command line options. It also provides a way for overriding
cc command line options.
The syntax for the CCOPTS environment variable in C shell notation is:
export CCOPTS="options | options" (ksh/sh notation)
setenv CCOPTS "options | options" (csh notation)
The compiler places the arguments that appear before the vertical bar in front of the
command line arguments to cc. It then places the second group of arguments after any
command line arguments to cc.
Options that appear after the vertical bar in the CCOPTS variable override and take
precedence over options supplied on the cc command line.
If the vertical bar is omitted, the compiler gets the value of CCOPTS and places its contents
before any arguments on the command line.