class A { A(); virtual void B(); };
A::A() {} /* Whoops, I forgot to define A::B() */ $ g++ -Wall a.cc /usr/lib/../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /tmp/ccaVlePI.o: In function `A::A()': a.cc:(.text+0xf): undefined reference to `vtable for A' collect2: ld returned 1 exit status bug submitter writes: "To be clear: the problem is that the error message only mentions the constructor, and the vtable. It doesn't mention the method A::B(), which is actually the problem. On a less-minimal example it could take much longer to work out what the real problem is." -- Summary: c++ error message [vtable undefined] is unhelpful Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: debian-gcc at lists dot debian dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42540