So I've been developing this game for a game design class for most of the semester. While I'm not new to C++ and Object Oriented Design, the theory of it is often a lot easier to comprehend and know than the actual application of it. Needless to say, I've run numerous problems throughout the development of my game, most being surmountable.
However, my next goal is to get the code leak free via valgrind on Linux. Unfortunately, I've been developing on windows using Dev-Cpp and the Mingw compiler, and this has spawned some problems. While my code compiles and runs on Windows, when I compile using G++ on Linux, I'm getting the dreaded...
undefined reference to `vtable for class'
undefined reference to `typeinfo for class'
I've done research into what the problem might be, I've visited the GCC FAQ entry about it, I've read accounts on this board. I've encountered this before, and it came from failing to implement a purely virtual function in some manner (Stub or full implementation) in a derived class. I've read over the code of the classes the error involves, and this does not seem to be the case. I've also been told that this error can come up when "the destructor is not adequately defined," but that not a concrete enough explanation as to what's going on for me.
To try to circumvent this problem, I tried making every function of the base class that was virtual pure-virtual, as to force a definition for each function in each derived class, stub or fully implemented, also in hopes of forcing the vtable for each class into its object file, but much to no avail. So at my wits end, I've come to this forum hopefully to find some answers. Are there any other things that such an error can result from? Or any advice or pointers that can be given?
Let me know if I should post my code, as I'm hesitant to because it will be four classes (Base, Derived, More Derived), a lot of code, and I'm not sure if I should omit comments/functions definitions/or what.
Thanks in advanced,