Exporting classes

Hi,

I'm having trouble exporting classes in a diamond structure from a DLL:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifdef DLLDLL_EXPORTS
#define DLLDLL_API __declspec(dllexport)
#else
#define DLLDLL_API __declspec(dllimport)
#endif

class DLLDLL_API CBase
{
...
};

class DLLDLL_API CDerivedA : virtual public CBase
{
...
};

class DLLDLL_API CDerivedB : virtual public CBase
{
...
};

class DLLDLL_API CDerivedAB : public CDerivedA, public CDerivedB
{
...
};


The functions, constructors and destructors of the classes give a linking error.

I'm capable of exporting normal and derived classes but I can't figure out how to do this, so I hope someone can help if this is even possible.
Topic archived. No new replies allowed.