Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started by: Scipi on November 18, 2011, 11:26:27 pm
-
I'm running into a wall with my code where apparently there are undefined virtual tables for some of my classes.
Here's the code:
http://pastebin.com/zXFgjF9S (http://pastebin.com/zXFgjF9S)
What I am doing is I have an Abstract Base Class, Item. And I have derived classes Medicine, DCD, and BlueLobster. Each place where the constructors and deconstructors are defined I get the error
undefined reference to `vtable for <Class_Name>'
Can anyone help me with what I'm doing wrong.
-
My initial guess would be that it is because of missing function implementations:
specifically void Medicine::Effect() { } and void DCD::Effect() { } and void BlueLobster::Effect() { }.
Edit:
If you get a link error of the form "Error: Unresolved or undefined symbols detected: virtual table for class Fred," you probably have an undefined virtual member function in class Fred.
So that's probably it.
-
Yeah, I figured that out last night and that was it. Thanks anyways :D