HP C A.06.05 Reference Manual
Compiling and Running HP C Programs
Compiling HP C Programs
Chapter 9210
cc my_file.c -v -g -DPROG=sub
cc my_file.c -vg -D PROG=sub
cc my_file.c -vgDPROG=sub
cc -vgDPROG=sub my_file.c
HP C Compiler Options
Table 9-1 summarizes the command line options supported by HP Integrity servers. Some of
these options are HP aC++ options. Refer to HP aC++/HP C Programmer’s Guide for detailed
information on compiler options.
Table 9-1 HP C Compiler Options at a Glance
Option Description
-.suffix Directs output from the -E option into a file with a
corresponding .suffix instead of a .c file.
-Aa Enables strict ANSI C compliance.
-AA Enables use of 2.0 Standard C++ library.
-Aarm Enables Tru64 UNIX C++ ARM dialect.
-AC89 Enables ANSI C89 compliance.
-AC99 Enables ANSI C99 compliance.
-Ae Enables ANSI C89 compliance, HP value-added
features (as described for +e option), and
_HPUX_SOURCE name space macro. It is equivalent
to -AC89 +e.
-Ag++ Enables GNU C++ dialiect compatibility.
-Agcc Enables GNU C dialect compatibility.
-AP Turns off the -AA mode and uses the older C++
runtime libraries.
-b Creates a shared library rather than an executable
file.
-Bdefault Assigns default export class to global symbols.
-Bhidden Assigns hidden export class to symbols.