title: How to avoid multiple definition of function (Linux, GCC/G++, Code::Blocks)
body: <p>I have a project in code blocks that uses many different files - quite often written by other programmers. At the moment I have a situation in which I have two different sub-projects containing function named in the same manner. Let's say: F(int x). So F(int x) is defined in two source files in two different locations and they have two different headers. Also I have created two different namespaces for those headers:</p>
  
  <pre><code>namespace NS1
  {
   extern "C"{
    #include "header1definingF.h"
   }
  }
  namespace NS2
  {
   extern "C"{
    #include "header2definingF.h"
   }
  }
  </code></pre>
  
  <p>But still compiler complains that it has multiple definition of F(int x). How can I workaround this in Code::Blocks (In Visual Studio it works just fine).</p>
  
  <p>EDIT: To be more clear those headers include C code. I haven't thought it will be so messy. There are like thousands of source files using other projects including thousands of functions again... so what to do. I have absolutely no idea how to make it work.</p>