title: g++ not linking header files properly
body: <p>I am using cygwin libraries to run C and C++ programs on Windows.</p>
  
  <p><code>gcc</code> runs fine, but with <code>g++</code>, I get a long list of errors. I think these erros are because of linking problems with C libraries.</p>
  
  <p><strong><em>Can you suggest what I need to do to fix this?</em></strong></p>
  
  <hr>
  
  <p><strong>beginning error lines:</strong></p>
  
  <pre><code>In file included from testgpp.cpp:1:
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:52:19: stdio.h: No such file or directory
  In file included from testgpp.cpp:1:
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:99: error: `::FILE' has not been declared
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:100: error: `::fpos_t' has not been declared
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:102: error: `::clearerr' has not been declared
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:103: error: `::fclose' has not been declared
  /cygdrive/c/cygwin/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdio:104: error: `::feof' has not been declared
  </code></pre>
  
  <p><strong>the whole error dump:</strong>
  <a href="http://pastebin.com/dfDj6YBi" rel="nofollow noreferrer">PasteBin</a></p>
  
  <hr>
  
  <p>for people asking for source code: this this is clearly a header file linking issue and happens before the compilation even starts. I get the same error for every .cpp file.</p>
  
  <pre><code>#include&lt;cstdio&gt;
  #include&lt;cstdlib&gt;
  #include&lt;iostream&gt;
  #include&lt;vector&gt;
  #include&lt;queue&gt;
  using namespace std;
  
  int main(){
      cout&lt;&lt;"hello world!";    
  }
  </code></pre>
  
  <p>gives me the very same error.</p>