HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
New Features in Version A.03.33
Chapter 142
Environment variables like LPATH and options like -l or -L override $TARGETROOT prefixing.
Support for _declspec
This release supports __declspec(dllimport) and __declspec(dllexport) as keywords. These
keywords have the same semantics as in Microsoft Windows compilers and ease porting of applications
developed in Microsoft Windows compilers to HP-UX systems.
Support of these keywords enhances the performance of shared libraries and relieves the usage of
HP_DEFINED_EXTERNAL pragmas to hide the non-exported symbols.
Syntax and Semantics
__declspec ( extended-attribute ) declarator
extended-attribute:
dllimport
| dllexport
1. Declaring a symbol with external linkage as __declspec(dllexport) tells the compiler that the
symbol should be exported from the current load module (shared library) and made visible to other load
modules.
2. Declaring a symbol with external linkage as __declspec(dllimport) tells the compiler that the
symbol is defined in a shared library and is outside the current load module.
3. Declaring a class with either the __declspec(dllexport) or __declspec(dllimport)
keyword results in all its member functions and static data members being marked for export or import
4. Only symbols having external linkage can be declared using these keywords.
5. It is legal to selectively specify members of a class as dllexport or dllimport but selective
specification is not allowed if the class itself is exported or imported.
-Bhidden and -Bhidden_def Command Line Options
The current behavior of the aC++ compiler on HP-UX systems is to export all symbols with external linkage
by default. In order to facilitate exporting only those symbols marked with __declspec(dllexport) and
hide the rest, use the following two options to hide the symbols by default.
/opt/aCC/lib /opt/xdk-ia/opt/aCC/lib
Native Location Alternate Tool Set Location