HP aC++/HP C A.06.28 Programmer's Guide Integrity servers (769150-001, March 2014)

The gdb command runs the HP WDB debugger:
$ gdb a.out
For more information on the HP WDB debugger, refer to “Debugging Options” (page 35).
Accessing Online Example Source Files
Online example source files are located in the directory /opt/aCC/contrib/Examples/
RogueWave. These include examples for the Standard C++ Library and for the Tools.h++ Library.
Compiler Command Syntax and Environmental Variables
The aCC command (the driver) invokes the HP aC++ compiling system. The aCC command is
followed by options and files that need to be compiled.
aCC [options] [files]
You must use the aCC command to link your C++ programs and libraries. This ensures that all
libraries and other files needed by the linker are available.
Example:
aCC prog.C
This command compiles the source file prog.C and puts the executable code in the file a.out.
For a complete list of command line options, see Chapter 2: “Command-Line Options” (page 31).
Examples of the aCC Command
Following are some examples of the aCC command:
Compiling and Renaming an Output File
aCC -o prog prog.C
This command compiles prog.C and puts the executable code in the file prog, rather than in the
default file a.out.
Compiling and Debugging
aCC -g prog.C
This command compiles prog.C and includes information that allows you to debug the program
with the HP WDB debugger, wdb.
Compiling Without Linking
aCC -c prog.C
This command compiles prog.C and puts the object code in the file prog.o. It neither links the
object file nor creates an executable file.
Linking Object Files
aCC file1.o file2.o file3.o
This command links the listed object files (file1.o, file2.o, and file3.o) and puts the
executable code in the file a.out.
NOTE: You must use the aCC command to link your HP aC++ programs and libraries. This ensures
that all libraries and other files needed by the linker are available.
Compiling, Optimizing, and Getting Verbose Information
aCC -O -v prog.C
24 Getting Started with HP aC++