HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

Contents
About This Document ...............................................................................................................20
Intended Audience.................................................................................................20
What’s in This Document.........................................................................................20
Typographical Conventions.................................................................................21
HP-UX Release Name and Release Identifier..........................................................22
Publishing History...................................................................................................23
Related Documents.................................................................................................23
HP Encourages Your Comments................................................................................23
1 Getting Started with HP aC++.................................................................................................24
Components of the Compilation System.....................................................................24
Using the aCC Command...................................................................................25
Compiling a Simple Program..............................................................................25
Executing the Program........................................................................................25
Debugging Programs.........................................................................................26
HP Code Advisor..........................................................................................26
HP WDB Debugger.......................................................................................26
Accessing Online Example Source Files...........................................................26
Compiler Command Syntax and Environmental Variables............................................26
Examples of the aCC Command..........................................................................27
Compiling and Renaming an Output File..........................................................27
Compiling and Debugging ............................................................................27
Compiling Without Linking.............................................................................27
Linking Object Files.......................................................................................27
Compiling, Optimizing, and Getting Verbose Information...................................27
Compiling and Creating a Shared Library........................................................27
Files on the aCC Command Line...............................................................................28
C++ Source File (.C file).....................................................................................28
Preprocessed Source Files (.i Files) ......................................................................28
Assembly Language Source Files (.s Files) ............................................................28
Object Files (.o Files)..........................................................................................29
Library Files (.a and .so Files)..............................................................................29
Configuration Files (.conf Files)............................................................................29
Environment Variables.............................................................................................30
aCC_FULL_PATHNAMES Environment Variable......................................................30
aCC_MAXERR Environment Variable....................................................................30
CXXOPTS Environment Variable...........................................................................30
CCLIBDIR Environment Variable...........................................................................31
CCROOTDIR Environment Variable......................................................................31
TMPDIR Environment Variable..............................................................................32
Floating Installation.................................................................................................32
Contents 3