__pure_virtual undefined symbol : SOLVED

sujit kumar kumar_sujit@yahoo.com
Wed Aug 1 02:14:00 GMT 2001


Hi All

I would like you to suggest on a particular Linker
error that I was facing while linking the files.
"
/source/GLOOF/ga/Video/framewrk/opengl/material.o(.gnu.linkonce.d.__vt_Q22gl8Material+0x8):
undefined reference to `__pure_virtual' " 
and same error is coming for various files.

These are the flags for linking : 
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2
/usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/gcc-lib/i386-linux/egcs-2.91.66/crtbegin.o
-L/usr/lib/gcc-lib/i386-linux/egcs-2.91.66
-L/usr/i386-linux/lib -lstdc++ -lm -lgcc -lc -lgcc
/usr/lib/gcc-lib/i386-linux/egcs-2.91.66/crtend.o
/usr/lib/crtn.o -lglut -ffast-math -lMesaGL -lm
-L/usr/X11/lib -L/usr/X11R6/lib -lX11 -lX11 -lXext
-lXmu -lXi -lSM -lICE

The SOLUTION:
The libgcc is not being included properly and this was
sorted out by extracting _pure.o from libgcc.a using
"nm" and linking it along with other object files.

Regards
Sujit Kumar.



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



More information about the Gcc-help mailing list