Undefined Reference to Function() : <p>So GCC keeps spouting out this error that keeps boggling my mind</p>

<p><code>undefined reference to 'GPS::isValidSentence(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'</code></p>

<p>my header file <code>parseNMEA.h</code> is as follows:</p>

<pre><code>#ifndef PARSENMEA_H_211217
#define PARSENMEA_H_211217

#include &lt;string&gt;
#include &lt;list&gt;
#include &lt;vector&gt;
#include &lt;utility&gt;

#include "position.h"

namespace GPS
{
  using std::string;
  using std::vector;
  using std::pair;

  bool isValidSentence(const string &amp;);
}
#endif
</code></pre>

<p>and my source file <code>parseNMEA.cpp</code> is:</p>

<pre><code>#include "parseNMEA.h"

using namespace GPS;

bool isValidSentence(const string &amp;n)
{
  string test = n;
  bool result;
  if (test.find("$GP") != string::npos)    //Find the prefix
  {
      if (test.size() &gt; 5)         //Check if it has 3 char identifier
      {
          //check if it has ',' after identifier
          if (test[6] == ',')
          {
              //check for a '*'
              if(test.find("*",7))
              {
                result = true;
              }
          }
      }

  }
  else
      result = false;
  return result;
}
</code></pre>

<p>Any ideas as to whats going on? I've tried <code>bool isValidSentence (const string &amp;n)</code> in the header file but the same error code</p>
