CompuServe Messages

#Link error

    15-Jul-93 08:45:46
Sb: #7020-#Link error
Fm: Kevin Irlen 76666,2005
To: Jim Schlight 70077,2120
(From previous responses to this question:) You'll get this link error anytime a reference to a virtual method is made when the vtable has not been built. The compiler uses the first virtual method in a class to start the vtable, and subsequent methods will use that as a starting point. For example: class X{ public: virtual void foo(void); virtual void bar(void); }; // void X::foo(void) {} // with this commented out, compiler won't build the vtable void X::bar(void) {} void main(void) { X x; x.bar(); // link error for X::_vtbl unitl X::foo defined. } Kevin Irlen Symantec Languages Support