XSD/HP-UX AP

From Code Synthesis Wiki

< XSD(Redirected from XSD/HP-UX Aa)
Jump to: navigation, search

Normally, XSD-generated code should be compiled with the -AA option when using the HP aCC A.03.x (also known as aCC3) on HP-UX. However, it is possible to compile the generated code with the -AP option by adding -Aa and using STLPort as a substitute for the native standard-compliant C++ runtime library (which is normally provided by aCC with the -AA option).

However, there are a few limitations that may or may not affect your application. As described in the HP aCC documentation, aCC provides two C++ runtimes: Classic (used when compiled with -AP) and Standard (-AA). The two runtimes are incompatible and cannot be used in the same process (which in turn means that you cannot mix object code compiled with these two options in the same application).

Each runtime consists of two parts: STL (string, vector, map, etc.) and iostream (various stream and streambuf classes). The main differences between the Standard and Classic runtimes (apart from some API changes) are:

  1. The Classic runtime is defined in the global namespace while Standard is in namespace std.
  2. For the iostream portion, the Classic runtime uses headers that end on .h (e.g., iostream.h) while Standard does not (e.g., iostream). The STL portion in both the Classic and Standard runtimes uses the same .h-less headers names (e.g., string).

STLPort is pretty much equivalent to the Standard aCC runtime except that it can co-exist with the Classic runtime in the same process (the symbols do not conflict since they are in different namespaces).

The main limitation of using both STLPort and the Classic runtime is the inability to use the STL portion of both Standard and Classic runtimes in the same translation unit. This limitation comes from the inability to include the necessary headers because of the file name clashes (see (2) above). The iostream portion does not have such a limitation. This may or may not be a problem for your application depending on whether or not you use STL and if you do, whether you can isolate the XSD-dependent part from the Classic-STL-dependent code.

To set up a build using this approach download and compile the STLPort library by following the accompanying build instructions. Then add the STLPort include directory to the list of include search paths (-I option) when compiling the XSD-genearted code as well as link your application to the STLPort library.

The configuration parameters that were sucessfully used to build Xerces-C++ are shown below:

./runConfigure -p hp-11 -c aCC -x aCC -r pthread -z -I/tmp/STLport-5.1.3/stlport -z -Aa -z -mt -l -Aa -l -mt
Personal tools