Setting the PATH environment variable to include the path to the compiler invocations
To use IBM® XL C/C++ for Linux, V13.1 commands without typing the complete path, you can add the location of the compiler invocations to the PATH environment variable.
The command to set the PATH environment variable
depends on the shell that you are using.
- If you are using the Bourne, Korn, or BASH shell, use
the following command:
export PATH=$PATH:installation_path/xlC/13.1.0/bin/
- If you are using the C shell, use the following command:
setenv PATH $PATH:installation_path/xlC/13.1.0/bin/
Note: To set this variable in the Bourne,
Korn, or BASH shell so that it applies to all users, add the command
to the file /etc/profile. To set it for a specific
user only, add the command to the file .profile in
the user's home directory. To set this variable in the C shell so that it applies to all users, add the command
to the file /etc/csh.cshrc. To set it for a specific
user only, add the command to the file .cshrc in
the user's home directory. The environment variable is set each time
the user logs in.