HP aC++ A.03.85 Release Notes

HP aC++ Release Notes
New Features in Version A.03.33
Chapter 1 41
3. In the following program, class ImportME is imported from outside the current load
module:
class __declspec(dllimport) ImportME
{
public:
void print();
};
4. In the following program, only member function mem() is exported:
class Test
{
public:
__declspec(dllexport) mem();
goo();
};
5. In the following program, exporting symbols with internal linkage is illegal:
__declspec(dllexport) static int static_int; //illegal
int main()
{
__declspec(dllexport) int local_export; //illegal
return 0;
}
6. In the following program, importing defined symbols is illegal:
__declspec(dllimport) int func() { } //illegal
7. In the following program, selectively exporting a member function when the class itself is
imported is illegal:
class __declspec(dllimport) Employee
{
__declspec(dllexport) void mem(); // illegal
};
8. In the following example, there are 2 source files: dll.C and caller.C. dll.C is used to
build the shared library containing the definition for class BaseClass. In caller.C, class
DerivedClass derives from BaseClass. Virtual member function foo() is overridden by
DerivedClass. But the other virtual member function goo() is not. Since goo() is not
exported from the shared library (dll.sl), the linker gives an unresolved symbol error.
You should be careful that all such functions are exported from the shared library.