This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
the shared library demands virtual methods?!
- To: egcs-bugs at cygnus dot com
- Subject: the shared library demands virtual methods?!
- From: Felix von Leitner <leitner at math dot fu-berlin dot de>
- Date: Tue, 23 Jun 1998 21:05:26 +0200
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