undefines reference to function in c++
<p>I have a class called Metadata, which is declared within the <code>namespace A::B::C</code>, which also contains the <code>struct copyInfo</code>, which holds the info about a metadata.
So, Metadata has only its default contructor / destructor, and when I try to use a member function from Metadata called 
    <code>importMetadata(vector&lt;copyInfo&gt; &amp;info, const string &amp;src, const string &amp;dst, const int &amp;job:</code> </p>

<p>I'm getting the following error:</p>

<pre><code>import_helper.cpp:(.text+0x246): undefined reference to
A::B::C::Metadata::importMetadata(std::vector&lt;A::B::C::copyInfo, std::allocator&lt;A::B::C::copyInfo&gt; &gt;&amp;, 
std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, 
std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int const&amp;)
namespace A{
  namespace B{
    namespace C{
        class Metadata{
              Metadata();
              ~Metadata();
             importMetadata(vector&lt;copyInfo&gt; &amp;seq, const string &amp;src, 
                 const string &amp;dst, const int &amp;job);
             /* more code down here */
        };
      }
     }
    }
</code></pre>

<p>Now, in <code>Metadata</code> I have:</p>

<p>That function is being called from a wrapper c++ function called <code>wrapperMetadataImport</code>, which belongs to <code>import_helper.cpp</code>. </p>

<pre><code>#include "Metadata.h"
using namespace A::B::C;

int wrapperMetadataImport(const char * src, const char * dest, const int * jobid){
        Metadata mtd;
        string src = srcName;
        string dest = destName;

        vector&lt;copyInfo&gt; sequence;

        /* add elemens to the vector sequence */

        if((ret = mtd.importMetadata(sequence,
                        src, dest, *jobid)) == EC_success){

        /* more code down here */
</code></pre>

<p>I have no clue why I'm getting that. I have checked the .h and .cpp file, everything sounds ok to me. I suppose it's a runtime linking problem. The namespacing should be as is: <code>A::B::C</code>. Any thoughts?</p>
