Possible Duplicate:
“undefined reference to” in G++ Cpp
I have this header
#ifndef TEST_H_
#define TEST_H_
class TEST
{
public :
TEST();
};
#endif /* TEST_H_ */
and this header
#ifndef TESTS_H_
#define TESTS_H_
#include "TEST.h"
class TESTS : public TEST
{
public :
TESTS();
};
#endif /* TESTS_H_ */
I implemented those header like this:
#include <iostream>
using namespace std;
#include "TEST.h"
TEST:: TEST()
{
}
int main(int argc, char **argv) {
return 0;
}
and this:
#include "TESTS.h"
TESTS :: TESTS() : TEST()
{
}
int main(int argc, char **argv) {
return 0;
}
and I get the follwing error:
/tmp/cc4jN1HN.o: In function TESTS::TESTS()':
TESTS.cpp:(.text+0xd): undefined reference to
TEST::TEST()'
Why is it ?
What am I doing wrong ?