aCC [options] [files]
aCC command (the driver) invokes the HP aC++
compiling system.
CAUTION: 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.
aCC prog.C
Compiles the source file prog.C and puts the executable code in the file
a.out.
Each file can be:
All other files are passed directly to the linker by the compiler.
C++ source files can also reference
C++ header files (.H files) using the
#include preprocessor directive.
Unless you use the -o option to specify otherwise,
all files that the aCC compiling system generates are put in the working
directory, even if the source files came from other directories.
.c or .C, possibly followed by additional
characters.
If you compile only, each C++ source file produces an object file with the same file name prefix as the source file and a .o file name suffix. However, if you compile and link a single source file into an executable program in one step, the .o file is automatically deleted.
CAUTION:
It is recommended that your source files have extensions of .c or .C
only, without additional characters. While file extensions other than .c
or .C are permitted for portability from other systems, other endings may
not be supported by HP tools and environments.
Typically, header files are referenced in C++ source files using the
#include preprocessor directive.
.i are assumed to be preprocessor
output files.
Files ending in .i are processed the same as .c or .C files,
except that the preprocessor is not run on the .i file before the file
is compiled.
Use the -P or the -E compiler option to preprocess a C++ source file without compiling it.
.s are assumed to be assembly source files.
The compiler invokes the assembler through cc to produce .o files from
these.
Use the -S option to compile a C++ source file to assembly code
and put the assembly code into a .s file.
.o extensions are assumed to be relocatable object
files that are to be included in the linking.
The compiler invokes the linker to link the object files and produce an executable file.
Use the -c option to compile a C++ source file into a .o file.
.a are assumed to be archive libraries.
Files ending with .sl are assumed to be shared libraries.
Use the -c and +z options to create object files of
position-independent code (PIC) and the -b option to create a shared
library.
Use the -c option to create object files and the ar command to combine
the object files into an archive library.
aCC -o prog prog.CCompiles
prog.C and puts the executable code in the file prog, rather
than in the default file a.out.
aCC -g prog.CCompiles
prog.C and includes information allowing you to debug the
program with the HP/DDE Debugger, dde.
aCC -c prog.CCompiles
prog.C and puts the object code in the file prog.o. Does not
link the object file and does not create an executable file.
aCC file1.o file2.o file3.o
Links the listed object files and puts the executable code in the file
a.out.
CAUTION: 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.
aCC -O -v prog.CCompiles and optimizes
prog.C, gives verbose progress reports, and
creates an executable file a.out.
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.
CXXOPTS
CCLIBDIR
CCROOTDIR
TMPDIR
export CXXOPTS="options | options" ksh notation setenv CXXOPTS "options | options" csh notation
If you do not use the vertical bar, all options are placed before the command line parameters.
Just set the environment variable and the options you want
are automatically included each time you execute the aCC
command.
export CXXOPTS="-v | -lm" ksh notation setenv CXXOPTS "-v | -lm" csh notation
Causes the -v and -l options to be passed to the aCC
command each time you execute it.
When CXXOPTS is set as above, the following two commands are equivalent:
aCC -g prog.C aCC -v -g prog.C -lm
export CCLIBDIR=directory ksh notation setenv CCLIBDIR directory csh notation
directory is an HP-UX directory where you want HP aC++ to look for libraries.
aCC command to search for libraries in an
alternate directory before searching in the default
directory, /opt/aCC/lib.
export CCLIBDIR=/mnt/proj/lib
Specifies that HP aC++ search the directory /mnt/proj/lib for
libraries, then search the directory /opt/aCC/lib.
When CCLIBDIR is set as above, the following two commands are equivalent:
aCC -L/mnt/proj/lib file.o aCC file.o
export CCROOTDIR=directory ksh notation setenv CCROOTDIR directory csh notation
directory is an aCC root directory where you want the HP aC++ driver to look for subprocesses.
aCC to invoke all subprocesses from an alternate
aCC directory, rather than from their default directory.
The default aCC root directory is /opt/aCC.
export CCROOTDIR=/mnt/CXX2.1
Specifies that HP aC++ search the directories under
/mnt/CXX2.1 (/mnt/CXX2.1/bin and /mnt/CXX2.1/lbin)
for subprocesses rather than their respective default directories.
export TMPDIR=directory ksh notation setenv TMPDIR directory csh notation
directory is the name of an HP-UX directory where you want HP aC++ to put temporary files during compilation.
/var/tmp.
export TMPDIR=/mnt/temp ksh notation setenv TMPDIR /mnt/temp csh notation
Specifies that HP aC++ should put all temporary files in /mnt/temp.