This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

the shared library demands virtual methods?!


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]