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]

Re: the shared library demands virtual methods?!


> Can anyone reproduce this?

You did not mention the architecture. I get

mira% gcc -shared -o t.so t.C
mira% gcc -o t -v t.so       
Reading specs from /usr/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.42/specs
gcc version egcs-2.91.42 19980622 (gcc2 ss-980502 experimental)
 /usr/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.42/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o t /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.42/crtbegin.o -L/usr/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.42 -L/usr/i486-pc-linux-gnu/lib t.so -lgcc -lc -lgcc /usr/lib/gcc-lib/i486-pc-linux-gnu/egcs-2.91.42/crtend.o /usr/lib/crtn.o
/usr/lib/crt1.o(.text+0x16): undefined reference to `main'
collect2: ld returned 1 exit status

which looks fine to me.

Martin


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