Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Itanium-based Systems: HP aC++/HP C Programmer's Guide > Chapter 1 Getting Started with HP aC++

Compiler Command Syntax and Environmental Variables

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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 HP aC++ 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”.

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

This command compiles and optimizes prog.C, gives verbose progress reports, and creates an executable file a.out.

Compiling and Creating a Shared Library

aCC +z -c prog.C

aCC -b -o mylib.sl prog.o

The first line compiles prog.C, creates the object file prog.o, and puts the position-independent code (PIC) into the object file. The second line creates the shared library mylib.sl, and puts the executable code into the shared library.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.