Header file :
class FakeMas
{
FakeMas();
~FakeMas();
}
CPP file:
FakeMas::FakeMas(){........}
FakeMas::~FakeMas(){}
I write a cpp file to test the FakeMas:
class FakeMasTest{
void test()
{
FakeMas fakemas;
fakemas.start();
}
}
the classes in the project called "zinc.testwebserver"
If I build it it says
FakeMasTest.cpp:29: undefined reference to `zinc::testwebserver::FakeMas::FakeMas()'"
If I change the test to:
FakeMas::FakeMas * fakemas = new FakeMas::FakeMas();
it says
error: ‘fakemas’ was not declared in this scope
If I change the test to:
FakeMas * fakemas = new FakeMas();
it says
undefined reference to `zinc::testwebserver::FakeMas::FakeMas()'
I really do not know how to do it...
get any ideas?
Thanks
FakeMas fakeMas;
. – chris Jan 9 '13 at 16:39FakeMas
into cpp file withFakeMasTest
? – tcb Jan 9 '13 at 16:44