Compiler product similarities

All of the IBM C and C++ compiler products for AIX Version 4 share some similar characteristics, in particular, the way the products are installed on the system and the configuration options available when using the products.

Multiple command line drivers

Each compiler product, with the exception of VisualAge C++ Professional for AIX Version 4.0, has multiple command line driver interfaces available, each causing a different set of default arguments to be used. For example, the C compiler products provide commands, such as cc, xlc, c89, cc_r, and so on. These commands are all links to a single compiler core, which uses a specific set of options, depending on the name of the command used to invoke it.

In addition to the default invocation commands provided when the compiler is installed, the system administrator can create new commands, which result in the compiler being invoked with a customized set of default options. This feature is controlled by the compiler configuration file, which lists the options to be used for each invocation command. The exact name of the configuration file differs between the compiler products, but generally has a name of the form /etc/comp.cfg, where comp indicates the compiler product that uses the configuration file.

Finding the compiler drivers

The earlier versions of the compiler products automatically created symbolic links in /usr/bin for each invocation command supplied by the compiler. For example, this means that if a user has the directory /usr/bin as part of their PATH environment variable (which it is, by default), they need only type cc on the command line to invoke the /usr/bin/cc command.

The later versions of the compiler products are designed to co-exist with earlier versions, and, as a consequence, they do not automatically create the symbolic links in /usr/bin when they are installed. This means that a user may have trouble invoking the compiler on a system that only has a new version compiler product installed. There are two solutions available in this instance:

  • When logged in as the root user, invoke the replaceCSET command supplied with the compiler. This will create appropriate symbolic links in /usr/bin to the compiler driver programs.

  • Alter the PATH environment variable to add the directory that contains the compiler driver programs. For example:

    PATH=/usr/vac/bin:$PATH; export PATH
    

The second solution should be used if two compilers are installed on a system, since it allows each user to choose which version of the compiler they wish to use. If the system only has one compiler installed, it makes sense to use the first solution. If required, the root user can reverse the action of the replaceCSET command by using the restoreCSET command, which is also supplied with the compiler. The exact location of the replaceCSET and restoreCSET commands will depend on the version of the compiler you are using. Note that the replaceCSET and restoreCSET tools are removed in Version 6.0 of the C and C++ compiler products.

Installation directory

The main components of the compiler product are installed on the system in the /usr file system. The exact directory used depends on the compiler product. Table A-1 on page 435 shows the location of this directory for C compiler products. Table A-2 on page 439 shows the location of this directory for C++ compiler products.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset