Compile-time and link-time environment variables

The following environment variables are used by the compiler when you are compiling and linking your code. Many are built into the AIX® operating system. With the exception of LANG and NLSPATH, which must be set if you are using a locale other than the default en_US, all of these variables are optional.

LANG
Specifies the locale for your operating system. The default locale used by the compiler for messages and help files is United States English, en_US, but the compiler supports other locales. For a list of these, see National language support. For more information on setting the LANG environment variable to use an alternate locale, see your operating system documentation.
LIBPATH
Specifies an alternate directory search path for dynamically linked libraries at application run time. If shared libraries required by your application have been moved to an alternate directory that was not specified at link time, and you do not want to relink the executable, you can set this environment variable to allow the dynamic linker to locate them at run time. For more information about this environment variable, see your operating system documentation.
NLSPATH
Specifies the directory search path for finding the compiler message and help files. You only need to set this environment variable if the national language to be used for the compiler message and help files is not English. For information on setting the NLSPATH, see Enabling the XL C/C++ error messages.
OBJECT_MODE
Optionally specifies the bit mode for compilation to either 32 or 64 bits. This is equivalent to the -q32 and -q64 compiler options. Set the OBJECT_MODE environment variable to a value of 32 for 32-bit compilation mode, or 64 for 64-bit compilation mode. If unspecified, the default compilation mode is 32 bits. See also -q32, -q64 for more information.
PATH
Specifies the directory search path for the executable files of the compiler. Executables are in /usr/vac/bin/ and /usr/vacpp/bin/ if installed to the default location.
TMPDIR
Optionally specifies the directory in which temporary files are created during compilation. The default location, /tmp/, may be inadequate at high levels of optimization, where paging and temporary files can require significant amounts of disk space, so you can use this environment variable to specify an alternate directory.
XLC_USR_CONFIG
Specifies the location of a custom configuration file to be used by the compiler. The file name must be given with its absolute path. The compiler will first process the definitions in this file before processing those in the default system configuration file, or those in a customized file specified by the -F option; for more information, see Using custom compiler configuration files.