Once a compiler product license has been enrolled, you are now ready to use the compilers. However, the compiler drivers are not installed in a directory that is searched with the default PATH environment variable. There are a number of methods for resolving this issue:
1. | Create symbolic links of the compiler drivers to /usr/bin using the ln command. |
2. | Add the directory containing the compiler drivers to the default PATH environment variable set in the /etc/environment configuration file. |
3. | Add the directory containing the compiler drivers to the PATH environment variable in each user’s .profile shell configuration file. |
4. | Change the Makefiles used in your development environment to configure the compiler macro to use the absolute path. For example: CC=/usr/vac/bin/cc |
Note
Creating symbolic links is the preferred option since it resolves the problem for all users after a simple action by the root user.
The Version 6.0 compiler products include a number of default compiler configurations in the /etc/vac.cfg compiler configuration file. The default C++ command line driver is /usr/vacpp/bin/xlC. The three main C compiler command line drivers are as follows:
/usr/vac/bin/cc | Extended mode C compiler. |
/usr/vac/bin/xlc | ANSI C compiler, using UNIX header files. |
/usr/vac/bin/c89 | ANSI C compiler, using ANSI C header files. |
There are a number of additional command line drivers available, each one based on the basic cc, xlc, and xlC drivers described above, as described in Table 1-4.
Command extension | Meaning |
---|---|
_r | Use the UNIX98 threads libraries. |
_r7 | Use the POSIX Draft 7 threads libraries. |
_r4[a] | Use the POSIX Draft 4 (DCE)[b] threads libraries. |
128 | Enable 128 bit double precision floating point values and use appropriate libraries. |
128_r | Enable 128 bit double precision floating point values and use the UNIX98 threads libraries. |
128_r7 | Enable 128 bit double precision floating point values and use the POSIX Draft 7 threads libraries. |
128_r4 | Enable 128 bit double precision floating point values and use the POSIX Draft 4 (DCE) threads libraries. |
[a] Compiler drivers with extension _r4 are not supported on AIX 5L Version 5.2 and later. AIX 5L Version 5.1 supports those compiler drivers only if DCE is installed on the system.
[b] DCE stands for Distributed Computing Environment.
For example, to compile an ANSI C program using Draft 7 of the POSIX threads standard, use the xlc_r7 compiler driver. To compile a C++ program that uses 128-bit floating point values, use the xlC128 compiler driver.
Note
The use of compiler drivers with extensions _r4 and _r7 is discouraged when developing new applications.