a header file

class a : public TObject
{
public:
  A();
  virtual ~A() {};
}

Then I've got the linking error of g++ as follows:

undefined reference to `vtable for A'

The solution is to define the real destructor in source file.

a header file

class a : public TObject
{
public:
  A();
  virtual ~A();
}

a source file

A::~A()
{
}

posted by citadel