Mail Archives: djgpp/1995/06/26/08:37:06
David DOT Hurt AT comm DOT hq DOT af DOT mil (Lt David Hurt) writes:
>Hello, All
>Sorry if this is a really stupid question, but I have been having a
>problem getting a program to link. All my individual files compile
>correctly, but when I link I get an error message complaining that
>"__pure_virtual" is an unresolved symbol.
>P.S. If it makes any difference, I am using the SLList template for
>a linked list. I create several lists of <Component *>
Well, I'm no C++ guru, but I think you're doing something wrong in
your code: the error message you describe occurs because you called
a method declared virtual, and not overloaded with a proper, *non-virtual*
method later. Such a 'pure virtual' method is to be understood as a
kind of place-holder in the father-classes, to be replaced by actual
implementations in *all* final child-classes. Your source seems to
lack these implementations.
If memory serves me well, there should also be some documentation on
this issue in the "g++ internals" info-file, that should be (is it?)
in gcc263dc.zip.
Hope this I got this right.
Hans-Bernhard Broeker
- Raw text -