Object Files (.o Files)

Files with .o extensions are assumed to be relocatable object files that have to be included in the linking. The compiler invokes the linker to link the object files and create an executable file.

Use the -coption to compile a C++ source file into a .o file.

Library Files (.a and .so Files)

Files ending with .a are assumed to be archive libraries. Files ending with .so are assumed to be shared libraries.

Use the -cand +z options to create object files of Position-Independent Code (PIC) and the -boption to create a shared library.

Use the -coption to create object files and the ar command to combine the object files into an archive library.

Configuration Files (.conf Files)

You can configure compiler options on a system-wide basis. The compiler reads the configuration files:

/var/aCC/share/aCC.conf (aC++), or

/var/ansic/share/cc.conf(ANSI C), if present.

In C-mode, the configuration file defaults to/var/ansic/share/cc.conf, unless overridden by the environment variable CC_CONFIG..

In C++ mode, the config file defaults to /var/aCC/share/aCC.conf, unless overriden by the environment variable CXX_CONFIG.

The options in the configuration file can be specified in the same manner as that for CCOPTS and CXXOPTS, namely:

[options-list-1] [[options-list-2]]

where options in options-list-1are applied before the options in the command line, and options in options-list-2are applied after the options in the command line.

The final option ordering would be:

<file-options-1><envvar-options-1><command-line-options>

<envvar-options-2><file-options-2>

NOTE: No configuration files are shipped along with aC++, but can be installed by the system administrator, if required.

The config file options before the "" character set the defaults for compilations, and the options after the character override the user’s command line settings.

Environment Variables

This section describes the following environment variables that you can use to control the HP aC++ or HP C compiler:

“aCC_FULL_PATHNAMES Environment Variable” (page 27)

“aCC_MAXERR Environment Variable” (page 27)

“CXXOPTS Environment Variable” (page 27)

“CCLIBDIR Environment Variable” (page 27)

“CCROOTDIR Environment Variable” (page 28)

26 Getting Started with HP aC++