title: C code compiled with C++: undefined reference
body: <p>I have a small program that I can compile with GCC and ICC without any difficulties, but I would also like the code to work with G++ and ICPC. I tried to add this:</p>
  
  <pre><code>#ifdef __cplusplus
    extern "C" {
  #endif
  </code></pre>
  
  <p>at the beginning and this:</p>
  
  <pre><code>#ifdef __cplusplus
    }
  #endif
  </code></pre>
  
  <p>at the end of all the header files, but I still get several `undefined reference to "..."' errors.</p>