Dear all,

I have the following structure in my project:

class A
{
  public:
    A() { };
}

class B : virtual public A
{
}

class C : virtual public A
{
}

class D : public B, public C
{
  public:
    D() {};
}

class E : public D
{
  public:
    E(Something *s) : smth(s) {};

  private:
    Something *smth;
}

and this seems to work fine. However, as soon as I add another level
and rework the structure as follows:

class E : public D
{
  public:
    E() {};
}

class F : public E
{
  public:
    F(Something *s) : smth(s) {};

  private:
    Something *smth;
}


I begin getting cryptic error messages on the link phase like


general/lib.o(.gnu.linkonce.t._ZN15FC1EP14Something+0x16): In function
`F::F[in-charge](Something*)':
/usr/include/c++/3.3/bits/stl_algobase.h:538: undefined reference to `VTT for F'


Could somebody please explain what I'm doing wrong? Online manuals
don't seem to help as their chapters on virtual inheritance usually
end with the D class and do not go into F and E classes.

Thank you!

With best regards,
Sergey Nikolenko.



_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to