title: Why is this giving me "Undefined references to constructors and destructors"?
body: <p>I have the following pieces of code:</p>
  
  <p>Leomedia.h</p>
  
  <pre><code>#include "MusicMetaDatter.h"
  
  #ifndef LEOMEDIA_H
  #define LEOMEDIA_H
  
  namespace Leomedia
  {
      typedef enum
      {
          read,
          write
      } FileMode;
  }
  
  #endif // LEOMEDIA_H
  </code></pre>
  
  <p>MusicMetaDatter.h</p>
  
  <pre><code>#ifndef MUSICMETADATTER_H
  #define MUSICMETADATTER_H
  
  #include "Leomedia.h"
  #include &lt;string&gt;
  
  /**
  * METADATTER
  * @Version 1.0.0a
  * @Author: Sergio Andrés Ibañez (Leonnears)
  * @Twitter: Leonnears
  * @Package: Leomedia
  */
  
      namespace Leomedia
      {
          typedef enum
          {
              mp3,
              m4a,
              flac,
              ape,
              wavPack,
              aiff,
              wav,
              ogg,
              tta
          } AudioFileType;
  
          class MusicMetaDatter
          {
              public:
                  MusicMetaDatter(std::string fileName, AudioFileType type, FileMode mode);
                  virtual ~MusicMetaDatter();
  
              private:
                  std::string md_fileName;
                  AudioFileType md_fileType;
                  FileMode md_fileMode;
          };
      }
  
      #endif // MUSICMETADATTER_H
  </code></pre>
  
  <p>MusicMetaDatter.cpp</p>
  
  <pre><code>#include "MusicMetaDatter.h"
  #include &lt;string&gt;
  
  Leomedia::MusicMetaDatter::MusicMetaDatter(std::string fileName, AudioFileType type, FileMode mode)
  {
      this -&gt; md_fileName = fileName;
      this -&gt; md_fileType = type;
      this -&gt; md_fileMode = mode;
  }
  
  Leomedia::MusicMetaDatter::~MusicMetaDatter()
  {
      //dtor
  }
  </code></pre>
  
  <p>MetaDatterTest.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "Leomedia.h"
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
      Leomedia::MusicMetaDatter meta("troll", Leomedia::mp3, Leomedia::read);
      return 0;
  }
  </code></pre>
  
  <p>When I compile MetaDatterTest I get the following errors:</p>
  
  <p>undefined reference to Leomedia::MusicMetaDatter::MusicMetaDatter(std::string, Leomedia::AudioFileType, Leomedia::FileMode)'
  undefined reference to Leomedia::MusicMetaDatter::~MusicMetaDatter()'
  undefined reference to Leomedia::MusicMetaDatter::~MusicMetaDatter()'</p>
  
  <p>All the files are in the same directory. I'm using mingw 4.4.1</p>
  
  <p>Can someone help me with this? It has dumbfounded me beyond understanding.</p>