test.cpp:(.text._ZN1AC2Ev[_ZN1AC5Ev]+0x8)||undefined reference to `vtable for A'|
<p>I have a veeeery simple code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;

class A
{
    public :

            A(){}
            virtual void fun(std::string);
            virtual ~A(){}
};

class B : public A
{
    public :

            B(){}
            void fun(std::string);
            ~B(){};
};

void B::fun(std::string)
{

}

int main()
{
    A a;
    return 0;
}
</code></pre>

<p>And I got this messages trying to compile it:</p>

<blockquote>
  <p>/home/Temp/test.o||In function <code>A::A()':|
  test.cpp:(.text._ZN1AC2Ev[_ZN1AC5Ev]+0x8)||undefined reference to
  </code>vtable for A'| /home/Temp/test.o||In function <code>A::~A()':|
  test.cpp:(.text._ZN1AD2Ev[_ZN1AD5Ev]+0xb)||undefined reference to
  </code>vtable for A'| /home/Temp/test.o:(.rodata._ZTI1B[typeinfo for
  B]+0x8)||undefined reference to `typeinfo for A'| ||=== Build
  finished: 3 errors, 0 warnings ===|</p>
</blockquote>

<p>Why is that?</p>
