Hi there!
I've got the following problem and would be very happy if there is somebody
with a solution! =)
Btw. I'm using Microsoft Visual C++ 6.0 Std Edition
I've generated a template class called "CSingleton "
template <class T>
class __declspec(dlle xport) CSingleton
{
static T *lpSingleton;
public:
CSingleton(void );
~CSingleton(voi d);
static T &GetSingleton(v oid);
static T *GetSingletonPt r(void);
};
Now I'm going to implement a texture manager (or whatever) like this
class DUSKENGINE_API CTextureManager : public CSingleton<CTex tureManager>
{
public:
CTextureManager (void);
~CTextureManage r(void);
};
When compiling this I get the following errors:
....
CTextureManager .obj : error LNK2001: "public: __thiscall
DuskEngine::Cor e::CSingleton<c lass
DuskEngine::Ren derer::CTexture Manager>::CSing leton<class
DuskEngine::Ren derer::CTexture Manager>(void)" (??0?$CSingleto n@VCT
extureManager@R enderer@DuskEng ine@@@Core@Dusk Engine@@QAE@XZ)
CTextureManager .obj : error LNK2001: "public: __thiscall
DuskEngine::Cor e::CSingleton<c lass
DuskEngine::Ren derer::CTexture Manager>::~CSin gleton<class
DuskEngine::Ren derer::CTexture Manager>(void)" (??1?$CSingleto n@VC
TextureManager@ Renderer@DuskEn gine@@@Core@Dus kEngine@@QAE@XZ )
....
How do I export home-brew-templates and classes that are using them in a
dll???
Thank you for your comments!
Marc André Ueberall
I've got the following problem and would be very happy if there is somebody
with a solution! =)
Btw. I'm using Microsoft Visual C++ 6.0 Std Edition
I've generated a template class called "CSingleton "
template <class T>
class __declspec(dlle xport) CSingleton
{
static T *lpSingleton;
public:
CSingleton(void );
~CSingleton(voi d);
static T &GetSingleton(v oid);
static T *GetSingletonPt r(void);
};
Now I'm going to implement a texture manager (or whatever) like this
class DUSKENGINE_API CTextureManager : public CSingleton<CTex tureManager>
{
public:
CTextureManager (void);
~CTextureManage r(void);
};
When compiling this I get the following errors:
....
CTextureManager .obj : error LNK2001: "public: __thiscall
DuskEngine::Cor e::CSingleton<c lass
DuskEngine::Ren derer::CTexture Manager>::CSing leton<class
DuskEngine::Ren derer::CTexture Manager>(void)" (??0?$CSingleto n@VCT
extureManager@R enderer@DuskEng ine@@@Core@Dusk Engine@@QAE@XZ)
CTextureManager .obj : error LNK2001: "public: __thiscall
DuskEngine::Cor e::CSingleton<c lass
DuskEngine::Ren derer::CTexture Manager>::~CSin gleton<class
DuskEngine::Ren derer::CTexture Manager>(void)" (??1?$CSingleto n@VC
TextureManager@ Renderer@DuskEn gine@@@Core@Dus kEngine@@QAE@XZ )
....
How do I export home-brew-templates and classes that are using them in a
dll???
Thank you for your comments!
Marc André Ueberall
Comment