This is the mail archive of the gcc-help@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]

__pure_virtual undefined symbol : SOLVED


Hi All

I would like u to see 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 was coming for various files.

These were 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/


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