The three components in the VisualAge C++ V6.0 package are:
- Batch C++ compiler - VisaulAge C++ for AIX compiler 6.0
- It continues to support the latest ISO/IEC 1998 C++ standard. A complete implementation of the ANSI C++ Standard Library, including the Standard Template Library (STL), is also included.
- Batch C compiler - C for AIX compiler 6.0
- Supports the latest ISO/IEC 1999 C standard, commonly called C99. Version V5.0 supports the C language that is consistent with the ISO/IEC 1990 C standard, commonly called C89.
- IBM distributed debugger
- Enhanced to support the debugging of C99, this debugger is written as a client/server application, and lets you debug programs running on systems accessible through a network connection and programs running on your workstation. It also lets you debug multiple applications, which may be written in different languages, from a single debugger session.
The Integrated Development Environment (IDE) and its associated tools that were included in V5.0 are no longer supported in V6.0. The following list of components were withdrawn from V6.0 of the VisualAge C++ compiler:
- Incremental C++ compiler
- IBM Open Class Library
- IDE and related tools, such as:
- Data Access Builder (DAX)
- Visual builder
- Performance analyzer
- LPEX editor
- IBM resource compiler (irc)
If you are migrating from the IBM Open Class Library to the Standard Template Library (STL), the IBM Open Class Library Transition Guide, VisualAge C++ Professional for AIX, Version 6.0 outlines various options.
Major enhancements of C for the AIX Compiler 6.0 are:
| GP/PWR4 exploitation | New optimization options that exploit the POWER4 architecture are now supported. For tuning considerations and details on the POWER4 processor and the new options, refer to The POWER4 Processor Introduction and Tuning Guide, SG24-7041,and C for AIX, Version 6.0, Compiler Reference, SC09-4960. |
| ISO C99 compliance |
Supports the latest ISO/IEC 9899:1999
International Standard, called C99, which includes many new
features and enhancements to the original ISO/IEC 9899:1990 International
Standard (C89). Example enhancements are:
|
| GCC source compatibility | To ease the migration of applications developed using GCC, the C compiler supports a subset of the GCC extensions. See C for AIX, Version 6.0, Compiler Reference, SC09-4960, for the full list of supported GNU C compatibility. |
| New options | Several new performance related options are introduced, notably the ones used to generate executable files optimized and tuned for the POWER4 processor: -qarch=pwr4, -qtune=pwr4 and âqlargepage. For a detailed description of these options, see C for AIX, Version 6.0, Compiler Reference, SC09-4960. |
| New pragmas | Of several new pragmas, one that's critical for multi-platform support is of the #pragma pack directive, which lets users modify the alignment rule for members of structures. For a detailed description of the new pragmas, see C for AIX, Version 6.0, Compiler Reference, SC09-4960. |
This section describes the more important enhancements of VisualAge C++ 6.0.
OpenMP is a standard API developed by an organization sponsored by many major hardware and software vendors. It is a collection of compiler directives, functions, and environment variables used to specify shared memory parallelism. The specification document, OpenMP C and C++ Application Program Interface, Version 1.0 - October 1998, is at www.openmp.org.
OpenMP support was previously available with the C for AIX compiler only. In V6.0, the OpenMP V1.0 specification is also supported in the VisualAge C++compiler. Now, C++ developers can use the new -q smp option and the simple, flexible, and portable OpenMP API to easily create multi-threaded applications, leaving most of the work to the compiler.
To learn more about OpenMP API, see Compiler Reference, VisualAge C++ Professional for AIX, Version 6.0, SC09-4959.
Template instantiation improvements
To reduce compilation time and code size, users of V5.0 compiler have to use the -qtempinc option, and structure their template declaration and definition correctly, so that each template instance referenced occurs exactly once in the executable. Version 6.0 introduces two new options, -qtemplateregistry and -qtemplaterecompile, that completely eliminate the need to organize the code in that way.
When -qtemplateregistry is specified, the compiler automatically maintains a template registry to implement a first-come, first-serve template instantiation algorithm. During compilation, the template registry is read and parsed whenever the use of a template is encountered. If the instantiation has never been seen before, the code for that instantiation is generated in the object code of that compilation unit, and the instantiation information is recorded in the registry. If the same instantiation occurs again in another compilation unit, the code is not generated again but the registry is still updated with the instantiation information.
If you remove a template instantiation from a source file whose corresponding object file contains the instantiation, recompiling this source file may result in undefined symbols at link time, since other files now may require the missing template instantiation. The -qtemplaterecompile option ensures that affected source files are recompiled automatically by consulting the template registry file.
Other enhancements include:
- GP/PWR4 exploitation and GCC/g++ source compatibility, described earlier for C, are also applicable for C++.
- Interprocedual Analysis (IPA) support with C++, previously available only for C. IPA is an optimization performed on the entire application across function boundaries.
- New options and pragmas, such as -qsmp, -qtemplateregistry, -q templaterecompile, -qarch=pwr4, -qtune=pwr4, -qlargepage and -q ipa, are implemented to support the enhancements. Details are in Compiler Reference, VisualAge C++ Professional for AIX, Version 6.0, SC09-4959.
Before installing VisualAge C++
Before installing VisualAge C++ for AIX 6.0, both C and C++ 6.0 compilers require AIX Operating System 4.3.3 or later. If your AIX level is older than 4.3.3, you should upgrade your AIX first.
As mentioned, some components of VisualAge C++ Compiler were withdrawn in V6.0. If you have a previous version of VisualAge C++ for AIX installed, you should uninstall the previous version first to avoid complications during your installation. However, if you want to install 6.0 with the previous version of compiler retained, you can use Perl scripts shipped on the CD to install the compiler in a non-default directory. Details are given in Retaining a previous version of the compiler.
VisualAge C++ for AIX uses License Use Management (LUM) to control the licenses for the product, and requires LUM 4.6.4 or higher. Before installing,
- Use the
lslpp âl | grep iforcommand to check the LUM runtime fileset level. If either of the following two things is true, your LUM is at the right level to support VisualAge C++ V6.0.bos.rte.ifor_ls > = 5.1.0.15 ifor_ls.libraries > = 5.1.0.15
These two filesets are actually the same; they're named differently because of the two distinctive ways LUM is distributed on AIX. When LUM is distributed with the AIX base media, the LUM runtime libraries are included as bos.rtte.ifor_ls. When LUM is distributed as a standalone product, either from the Web site downloading or with other enabled products, the LUM libraries are included as ifor_ls.libraries. As a standalone product, the fileset name of bos.rte.ifor_ls cannot be used because filesets belonging to bos.rte package cannot be installed as an LPP, but only as part of AIX installation.
Once the ifor_ls.libraries is installed on a system, it supersedes bos.rte.ifor_ls, and starting from that moment bos.rte.ifor_ls is no longer used. All subsequent updates of LUM libraries must be done using ifor_ls.libraries.
Also, LUM's fileset level numbering is independent of the version of AIX that the fileset is to be used with. In fact, the numbering is based on the latest version of the AIX operating system that a particular version of LUM supports. LUM 4.6.4 supports AIX 5.1, therefore its fileset, such as ifor_ls.libraries and ifor_ls.base.cli, have a level of 5.1.0.15 but can be used for AIX 4.3.3 also.
- If you find that you need to upgrade the level of LUM, the minimum level of LUM required is 4.6.4, and is shipped in the VisualAge C++ V6.0 CD. However, the LUM filesets are not located in the standard directory where the compiler filesets are, therefore you would not be able to do a
smit install_all. To install the LUM filesets, you will need to mount the CD and go to the lum directory. Within this directory are two directories, aix43 and aix50.cdto the corresponding directory and then runsmit install_allfrom inside this directory and install all of the filesets. - You can also download LUM from License Use Management, which is definitely higher than the required level of 4.6.4.
- After LUM 4.6.4 or higher is installed, use
smit install_allto install the VisualAge C++ 6.0 compiler. If you have a previous version of the compiler, you should have uninstalled it already. Don't attempt to runsmit update_allfor the reason mentioned earlier, otherwise you would end up with a hybrid version of V5.0 and V6.0. - Once you have VisaulAge C++ 6.0 compiler installed, it is strongly recommended that you install the latest patches from IBM VisualAge C++.
At the time of this writing, May 2003 VisualAge C++ for AIX Version 6 PTF is already available for download.
Retaining a previous version of the compiler
With VisualAge C++ 6.0 compiler, you have the option to install the compiler in a non-default library and retain the previous version of the compiler, and run two versions of VisualAge C++ for AIX on a single system. By default, the VisualAge C++ compiler is installed to the /usr/vacpp/ directory. You can use the supplied Perl script /usr/vacpp/bin/vacppndi to install the compiler to a different directory.
Complete non-default installation instructions are at the beginning of the script. Before starting, you should read the first few pages of the script. The following is a short summary of the steps for the non-default installation:
- Install the perl.rte fileset from AIX base CD, which is the Perl runtime environment
- Install the vacpp.ndi fileset from the VisualAge C++ for AIX CD-ROM media
- Use the /usr/vacpp/bin/vacppndi to install just the compiler, or the compiler with PDF documentation and samples, to a location of your choice.
To install the compiler with PDF documentation and samples:
# perl /usr/vacpp/bin/vacppndi -d source_path -b target_directory
source_path is where the compiler filesets are located, and target_directory is a non-existent directory that gets created by the vacppndi tool and will contain the base compiler. After installation, the compiler is in the target_directory/usr/vacpp.
To install the compiler only, a minimal installation without PDF documentation and samples:
# perl /usr/vacpp/bin/vacppndi -d source_path -b target_directory -m
After installation, check the ./vacppndi.log log file and make sure the installation was successful.
Limitations of the non-default installation
The non-default installation comes with significant limitations. Fully consider the following limitations before taking this approach.
- This is not the installation method that is recommended by the VisualAge C++ developers. Only an expert AIX user familiar with the compiler and the standard installation process should attempt it.
- To report a compiler problem, the error must be reproducible with standard installation using the AIX installp command, or the SMIT installation utility.
- The IBM Distributed Debugger or the HTML-format online help cannot be installed using this script.
- Since this method of installation does not use the AIX installp command, fileset requisite checks are not performed. Software installation information in AIX Object Database Manager (ODM) database is not updated either, therefore the lslpp command would not show information regarding to the installation of this compiler.
- Future updates to the compiler have to be installed using vacppndi also.
The following online books provide detailed information to supplement the topics in this article:
- Getting Started: Introduction, Installation, and Migration Guide , VisualAge C++ Professional for AIX, Version 6.0
- C/C++ Language Reference, VisualAge C++ Professional for AIX, Version 6.0
- IBM Open Class Library Transition Guide, VisualAge C++ Professional for AIX, Version 6.0
- Programming Tasks and Library Reference, VisualAge C++ Professional for AIX, Version 6.0
- Compiler Reference, VisualAge C++ Professional for AIX, Version 6.0
Lee Cheng currently works as a Senior Consultant for pSeries and AIX software vendors. She provides support to them in the areas of application benchmarks, performance tuning, application porting, and internationalization. Before joining the RS/6000 ISV Technical Support group, she was a developer for compilers and the AIX system management component. She holds an MS in Computer Science from the University of Kentucky. Lee can be reached at chenglc@us.ibm.com.
Comments (Undergoing maintenance)





