Enabling the error messages

If your system uses the en_US locale and encoding, the compiler message catalogs are automatically configured to display correctly, regardless of whether you used the basic or advanced method of installation and configuration. However, if your system uses any other supported locale (for a list of supported language locales, see National language support), you must set the NLSPATH environment variable, so that the compiler and runtime functions can find the appropriate message catalogs after the installation.

The command to set the NLSPATH 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 NLSPATH=$NLSPATH:
    		xlsmprt_path/msg/%L/%N:
    		xlrte_path/msg/%L/%N:
    		xlcmp_path/xlC/13.1.0/msg/%L/%N
  • If you are using the C shell, use the following command:
    setenv NLSPATH $NLSPATH:
    		xlsmprt_path/msg/%L/%N:
    		xlrte_path/msg/%L/%N:
    		xlcmp_path/xlC/13.1.0/msg/%L/%N
where:
  • xlsmprt_path is the installation location of the SMP packages. By default, it is /opt/ibmcmp/.
  • xlrte_path is the installation location of the IBM® XL C/C++ for Linux, V13.1 runtime packages. By default, this is /opt/ibmcmp/.
  • xlcmp_path is the installation location of the IBM XL C/C++ for Linux, V13.1 compiler packages. By default, this is /opt/ibm/.
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.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us