title: Linking in several C object files that contain functions with equivalent signature
body: <p>Lets say I have a C++ program and I want to call functions from a C object file in it. The constraint is that I'm not allowed to make any changes to the C source files.</p>
  
  <p>In this case I would include the C header as <em>extern "C"</em> in my C++ file, call the function, compile the C object using <em>gcc -c</em>, and pass the result to <em>g++</em> along with the actual C++ sources.</p>
  
  <p>I guess what I would also do is to put the C-header <em>#include</em> inside a named <em>namespace</em> block in the C++ file, as to keep the local namespace clean (who knows what other fancy stuff there is in the <em>.h</em> file).</p>
  
  <p>What now if I need to call functions from two C object files. Lets say that they have different signatures. But there are also some duplicate functions in the object files. Wouldn't my linker blow up at this point if I tried to pass both objects to g++ at the same time? Same for globals.</p>
  
  <p>Again: I'm not allowed to change <strong>ANY</strong> of the C sources. Else I would just rename the .c files to .cxx, wrap their contents and the contents of the corresponding headers inside <em>namespace bla { }</em> and feed everything to <em>g++</em>.</p>
  
  <p><em>(Yes, C is not a subset of C++, as has already been mentioned in one of the comments)</em></p>