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

Environment Variables

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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

Exporting the aCC_FULL_PATHNAMES variable causes the compiler to include full path names for files in compiler messages. This feature is useful in debugging.

CXXOPTS Environment Variable

The CXXOPTS environment variable provides a convenient way to include frequently used command-line options automatically.

Options before the vertical bar (|) are placed before command-line options to aCC. The options after the vertical bar are placed after any command-line option. Note that the vertical bar must be delimited by white space.

If you do not use the vertical bar, all options are placed before the command line parameters. Set the environment variable and the options you want are automatically included each time you execute the aCC command.

Syntax:

export CXXOPTS="options | options" ksh/sh notation

setenv CXXOPTS "options | options" csh notation

Usage:

For quick or temporary changes to your build environment, use CXXOPTS instead of editing your makefiles.

Example:

export CXXOPTS="-v | -lm" ksh/sh notation

setenv CXXOPTS "-v | -lm" csh notation

The above command 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

CCLIBDIR Environment Variable

The CCLIBDIR environment variable causes the aCC command to search for libraries in an alternate directory before searching in the default directories.

Syntax:

export CCLIBDIR=directory   ksh/sh notation
setenv CCLIBDIR directory   csh notation

directory is an HP-UX directory where you want HP aC++ to look for libraries.

Example:

export CCLIBDIR=/mnt/proj/lib

In this example HP aC++ searches the directory /mnt/proj/lib for libraries before searching the directory /opt/aCC/lib.

When CCLIBDIR is set a in the above example, the following two commands are equivalent:

aCC -L/mnt/proj/lib file.o

aCC file.o

NOTE: You can use the -Ldirectory option to specify additional directories for the linker to search for libraries.

CCROOTDIR Environment Variable

The CCROOTDIR environment variable causes aCC to invoke all subprocesses from an alternate aCC directory, rather than from their default directory. The default aCC root directory is /opt/aCC.

Syntax:

export CCROOTDIR=directory   ksh/sh notation
setenv CCROOTDIR directory   csh notation

directory is an aCC root directory where you want the HP aC++ driver to search for subprocesses.

Example:

export CCROOTDIR=/mnt/CXX2.1

In this example, HP aC++ searches the directories under /mnt/CXX2.1 (/mnt/CXX2.1/bin and /mnt/CXX2.1/lbin) for subprocesses rather than their respective default directories.

TMPDIR Environment Variable

The TMPDIR environment variable allows you to change the location of temporary files created by the compiler. The default directory is /var/tmp.

Syntax:

export TMPDIR=directory   ksh/sh 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.

Example:

export TMPDIR=/mnt/temp   ksh notation
setenv TMPDIR /mnt/temp   csh notation

The above example specifies that HP aC++ should put all temporary files in /mnt/temp.

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