title: Undefined symbol error when calling Singleton getInstance()
body: <p>I have no idea why this is happening, I followed the example posted <a href="https://stackoverflow.com/questions/1008019/c-singleton-design-pattern/1008289#1008289">here.</a></p>
  
  <pre><code>class Song {
  
  private:
      // singletong
      Song();
      Song(Song const&amp;); // don't implement
      void operator = (Song const&amp;); //don't implement
  
  public:
      // Singleton method
      static Song &amp;getInstance(){
          static Song song;
          return song;
      }
  
  };
  </code></pre>
  
  <p>If I don't call the class, there's no problem. As soon as I call the Song class like this:</p>
  
  <pre><code>Song::getInstance();
  // also tried: Song &amp;song = Song::getInstance();
  </code></pre>
  
  <p>Xcode doesn't want to build the project anymore. I'm getting this error:
  <img src="https://i.stack.imgur.com/6AtX3.png" alt="enter image description here"></p>
  
  <p>Any ideas why this is happening?</p>