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.
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.
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.