the shared library demands virtual methods?!

Felix von Leitner leitner@math.fu-berlin.de
Tue Jun 23 12:05:00 GMT 1998


egcs-2.91.42 19980621 with GNU ld version 2.9.1 (with BFD 2.9.1.0.6)
shows this behavior:

  $ cat t.C
  class fubar {
  public:
    virtual void blubb()=0;
  };
  $ gcc -shared -o t.so t.C
  $ gcc -o t t.so
  /usr/lib/crt1.o: In function `_start':
  ../sysdeps/alpha/elf/start.S:35: undefined reference to `main'
  t.so: In function `global constructors keyed to t.C':
  t.C(.text+0x60): undefined reference to `fubar::blubb(void)'
  collect2: ld returned 1 exit status
  $

So it wants me to define the virtual method?!
Is it my fault, my binutils' fault, or egcs fault?

Can anyone reproduce this?
Any help is appreciated (please Cc to me)

Felix



More information about the Gcc-bugs mailing list