I have the following :
class Test
{
public:
static void Temp();
void MyFunc();
private:
static int i;
};
void Test::MyFunc()
{
Test::Temp();
}
void Test::Temp()
{
i = 2;
}
When I compile this as a stand alone executable, it works fine.
When I compile as a library, the compiler says :
undefined reference to `Test::i'
Any ideas?
Thanks,
Morfeas