HP aC++/HP C A.06.25 Programmer's Guide
NOTE: If you distribute either executable files or shared libraries as part of your
product, do not ship these HP aC++ runtime libraries with your product in such a way
that it results in overwriting a newer library version with an older, incompatible version.
Ensure that an older library version is not installed over a newer one.
Linking Your HP aC++ Libraries with Other Languages
The C++ language requires that non-local static objects be initialized before any function
or object is used. HP aC++ automatically initializes non-local static objects in all object
files, including shared libraries, before the first statement in main() executes. No
special files or link options are needed.
If the library is being dynamically loaded from pure C or Java as a plugin, the library
should be linked with the HP aC++ runtime libraries in the following order:
-AP: -lstd -lstream -lCsup -lunwind -lm
-AA: -lstd_v2 -lCsup -lunwind -lm
If the library does not use libstd (STL) or libstream (iostreams), then they can be
eliminated. If tools.h++ is used, then add -lrwtool (or -lrwtool_v2) to the left.
In addition, your customers must review Chapter 10: “Mixing C++ with Other
Languages” (page 247) for information on linking HP aC++ modules with HP C, and
HP FORTRAN 90.
Installing your Application
HP aC++ releases are usually forward compatible, but HP cannot guarantee that this
will be true for all releases. If you have questions about the compatibility of HP aC++
releases, you should contact your HP support representative.
Normally your customer will already have the correct runtime installed. If your product
requires a newer version, it is recommended that the customer install the latest runtime
patch.
Your application’s installation procedure should install the appropriate HP aC++
components in the standard directories on your customer’s systems. This will ensure
that the aCC command can find them.
NOTE: If your customer already has HP aC++ installed and their version is newer
than yours, do not overwrite any of the existing HP aC++ components. Do not install
your product on a system that has a newer version of HP aC++ if that newer version
is incompatible with your version.
Ensure that your customer does not install a version of HP aC++ after installing your
product; if that version of HP aC++ is incompatible with your version.
258 Distributing Your C++ Products