Public bug reported:

I've had response to g++ crash reports, so maybe you'd also like to know
about this confusing error message I found.

Thanks!
Alan

This is on an up-to-date install of "Ubuntu 8.04.1".

apt-cache policy gcc
gcc:
  Installed: 4:4.2.3-1ubuntu6
  Candidate: 4:4.2.3-1ubuntu6
  Version table:
 *** 4:4.2.3-1ubuntu6 0
        500 http://gb.archive.ubuntu.com hardy-updates/main Packages
        100 /var/lib/dpkg/status
     4:4.2.3-1ubuntu3 0
        500 http://gb.archive.ubuntu.com hardy/main Packages


Minimal test program:

class A {
    A();

    virtual void B();
};

A::A() {}
/* Whoops, I forgot to define A::B() */

Actual error message:

/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/crt1.o: In function 
`_start':
(.text+0x20): undefined reference to `main'
/tmp/cc8P2uDq.o: In function `A::A()':
test.cpp:(.text+0x9): undefined reference to `vtable for A'
/tmp/cc8P2uDq.o: In function `A::A()':
test.cpp:(.text+0x1f): undefined reference to `vtable for A'
collect2: ld returned 1 exit status

Expected error message:

Something more like "undefined reference to A::B()"

** Affects: gcc-defaults (Ubuntu)
     Importance: Undecided
         Status: New

-- 
c++ error message [vtable undefined] is unhelpful
https://bugs.launchpad.net/bugs/305460
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to