title: undefined reference to function code blocks
body: <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  void echo(string);
  
  int main()
  {
      echo("hello");
      cout &lt;&lt; "Hello world!" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>print.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  void echo(string code){
     cout &lt;&lt; code;
  }
  </code></pre>
  
  <p>After compiling the code in code blocks 12.11, it gives me that error:</p>
  
  <pre><code>undefined reference to `echo(std::string)
  </code></pre>
  
  <p>I use windows 7 x64.
  I have added the directory; Project>build options > search directories and added the current working directory.
  All the files are in one console project in code blocks</p>