C++ linker error
<p>I'm new to C++ and need some help with namespaces.
Following are my 4 files:</p>

<pre><code>node.h &lt;--class interface
node.cpp &lt;--implementation
testNodeFunctions.cpp 
testNodeMain.cpp

//node.h
---------------------------------
#include &lt;iostream&gt;
using namespace std;

namespace namespaceName{

    class Node {
    private:
        int data;

    public:
        void setData( int x);
        int getData();

    };
   //and some more functions

}

//node.cpp
-------------------------------------
#include &lt;iostream&gt;
#include "node.h"
using namespace std;

namespace namespaceName {
      //provides implementation of the memeber functions
     int Node::getData() const{
       return data;
     }
     void Node::setData(int x){
     data=x;
     }

}//namespace


//testNodeFunctions.cpp 
-------------------------------------
#include &lt;iostream&gt;
#include "Node.h"
using namespace std;
using namespace namespaceName;

void showData(){
  //creates a Node object and prints some stuff
  Node a=37;
  cout&lt;&lt;a.getValue()&lt;&lt;endl;
}


//testNodeMain.cpp
----------------------------------------------
#include &lt;iostream&gt;
#include "Node.h"

void showData();

int main(){
//calls methods from testNodeFunctions
showData();
}
</code></pre>

<p>I'm not sure if I'm defining the namespace currently. </p>

<p>How Do I call the showData() function from the testNodeMain.cpp file. Currently I'm getting linker error stating that "undefined reference to namespaceName::Node::methodname"</p>

<p>Thanks so much in advance</p>

<p>Okay. That make sense. I removed , using namespace std from header. I'm compiling the testNodeMain.cpp which has the main(). the TestNodeMain.cpp calls functions from testNodeFunctions.cpp. testNodeFunctions.cpp creates Node object. </p>
