Mail Archives: djgpp/1997/02/07/15:08:11
Stavel Jan wrote:
>
> Hallo !
>
> Could anyone explain me in short what does the error from ld.exe
> mean :
In short it means, that ld.exe couldn't find in any of your
object files or libraries the virtual table for that class.
But I think you are interested in the reason, why this happened.
There are several reasons:
1) You have in the include file, where the class declared, a
statement
#pragma interface
on nowhere in your source files a statement like
#pragma implementation "name_of_file.h"
This was the technique from gcc before version 2.7. From
version 2.7 on this not needed any longer, because gcc
emits now the virtual table in the object file, which
defines the first not inlined member function of that
class.
2) You forgot to link a objectfile.
3) (As a result of 1) last paragraph) You forgot to implement
at least on member function of your class (probably the
first not-inlined)
Robert
--
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post: Am Berg 3, D-09573 Dittmannsdorf *
* e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE *
* WWW: http://www.tu-chemnitz.de/~rho *
*****************************************************************
- Raw text -