Original Post
Hey everyone! First off, lemme just say thanks for reading :). I'm trying to create a singleton class for a game project. I think it's almost there, I used the tutorial found at http://www.gameprogrammer.org/main.php?page=tutorials&no=73 but I'm having a little bit of trouble getting the last pieces to work. I'm using it to make an image manager, and the error output is the following: undefined reference to `singleton::getInstance()' I tried all kinds of things and I must admit I'm clueless as to why this error occurs. Can someone maybe point out what's wrong with the code? I call the singleton by doing imgmgr::getInstance() as I read in the tutorial but somehow it fails to work. Anyway, I'd appreciate any help. I've included the code of the two classes below :) In imgmgr.h: #ifndef IMGMGR_H_ #define IMGMGR_H_ #include
- #include "imgdata.h" #include "singleton.h" using namespace std; class imgmgr : public singleton