Setting up and customizing XL C/C++

This section provides brief overview information about setting up and customizing XL C/C++, together with pointers to other documentation that describes specific set-up and customization topics in greater detail.

Environment variables and XL C/C++

XL C/C++ uses a number of environment variables to control various aspects of compiler operation. Environment variables fall into two basic categories:

Setting the compiler working environment

These environment variables define the basic working environment for the compiler, including specifying your choice of national language or defining the location of libraries or temporary files. For complete information, refer to Setting up the compilation environment.

LANG
Specifies the default national language locale used to display diagnostic messages and compiler listings.
LIBPATH
Specifies the location of libraries used at run time.
MANPATH
Specifies the search path for system, compiler, and third-party man pages.
NLSPATH
Specifies one or more directory locations where message catalogs can be found.
PDFDIR
Specifies the directory location where profile-directed feedback information is stored when you compile with the -qpdf option.
TMPDIR
Specifies the directory location where the compiler will store temporary files created during program compilation.

Setting the default runtime options

These environment variables define runtime compiler option defaults to be used by the compiler, unless explicitly overridden by compiler option settings specified on the command line or in directives located in your program source. For complete information, refer to Setting up the compilation environment.

OBJECT_MODE
If set, this environment variable sets the default object mode to be either 32-bit or 64-bit, or both.
XLSMPOPTS
The XLSMPOPTS environment variable allows you to specify run time options that affect SMP execution.
OMP_DYNAMIC, OMP_NESTED, OMP_NUM_THREADS, OMP_SCHEDULE

These environment variables, are part of the OpenMP standard. They let you specify how the application will execute sections of parallel code.

Customizing the configuration file

The configuration file is a plain text file that specifies default settings for compiler options and invocations. XL C/C++ provides a default configuration at file /etc/vac.cfg during compiler installation.

If you are running on a single-user system, or if you already have a compilation environment with compilation scripts or makefiles, you may want to leave the default configuration file as it is.

As an alternative, you can create additional custom configuration files to meet special compilation requirements demanded by specific applications or groups of applications.

See Customizing the configuration file for more information on creating and using custom configuration files.

Determining what level of XL C/C++ is installed

You may not be sure which level of XL C/C++ is installed on a particular machine. You will need to know this information if contacting software support.

To display the version and PTF release level of the compiler you have installed on your system, invoke the compiler with the -qversion compiler option. For example:

xlC -qversion