A
Avi Uziel
Hi All,
I'm writing a Windows DLL which contain some utility classes.
One of my classes is Singleton, therefore contain some static members.
I'm using VC6 and linking to the DLL statically.
My question is where is the correct (and best way) to initialize
theses variables? If I initialize them in the class CPP (in the DLL)
then I get linkage error when I try to link my project with the LIB,
and I don't want to make the user initialize those variables.
---- The DLL mydll.dll :
classA.h:
class DLL_EXPORT A{
static int x;
}
classA.cpp
I would like to write:
int A::x = 0;
I'm writing a Windows DLL which contain some utility classes.
One of my classes is Singleton, therefore contain some static members.
I'm using VC6 and linking to the DLL statically.
My question is where is the correct (and best way) to initialize
theses variables? If I initialize them in the class CPP (in the DLL)
then I get linkage error when I try to link my project with the LIB,
and I don't want to make the user initialize those variables.
---- The DLL mydll.dll :
classA.h:
class DLL_EXPORT A{
static int x;
}
classA.cpp
I would like to write:
int A::x = 0;