title: Linking files in g++
body: <p>Recently I have tried to compile a program in g++ (on Ubuntu). Usually i use Dev-C++ (on Windows) and it works fine there as long as I make a project and put all the necessary files in there. </p>
  
  <p>The error that occurs when compiling the program is:</p>
  
  <pre><code>$filename.cpp: undefined reference to '[Class]::[Class Member Function]'
  </code></pre>
  
  <p>The files used are as following:</p>
  
  <p><i>The source code (.cpp) file with the main function.</p>
  
  <p>The header file with the function prototypes.</p>
  
  <p>The .cpp file with the definitions for each function.</i></p>
  
  <p>Any help will be appreciated.</p>