title: Why can I link two libraries exporting the same C-Function in VC?
body: <p>I have the situation that two C++ Libraries export the very same C-function symbols from shared code. When I now compile an executable which links both libraries, I do not get any linker error or warning from VC12. Why is this? It silently just chooses one of the two symbols and I have no idea which one is chosen.;</p>
  
  <pre><code>extern "C" { __declspec(dllexport) int function(void* argument);}
  </code></pre>
  
  <p>There is a flag named /FORCE which whould be able to convice VC to compile even if there are multiply defined symbols, but this flag is not set.</p>
  
  <p>I do not find any official information from Microsoft why this links at all. I was expecting to get a LNK4006 warning, but I don't.</p>
  
  <ol>
  <li>I just want to know if this is the expected or undefined behavior, which only did not explode by coincidence. I read things about the One Definition Rule not being applied generally to C-Code, but I cannot find any reliable statement for the VC compiler.</li>
  <li>Can I assume that, given the functions do not use any singletons, use the very same code and compiler flags, it does not matter which one is chosen?</li>
  </ol>