I have no idea why this is happening, I followed the example posted here.
class Song {
private:
// singletong
Song();
Song(Song const&); // don't implement
void operator = (Song const&); //don't implement
public:
// Singleton method
static Song &getInstance(){
static Song song;
return song;
}
};
If I don’t call the class, there’s no problem. As soon as I call the Song class like this:
Song::getInstance();
// also tried: Song &song = Song::getInstance();
Xcode doesn’t want to build the project anymore. I’m getting this error:

Any ideas why this is happening?
Your not implementing the constructor which has to exist since your instantiating an object in the
getInstance()function:Either implement it inline (unprefered):
Or implement it in a compilation unit (e.g Sound.cpp) (prefered):