title: c++ project not working after moving to new Windows 7 PC
body: <p>I have C++ projects on Windows 7 + NetBeans + MinGW. They worked very well for years. Yesterday, because of hardware problem, I have to use a new Windows 7 PC. I installed NetBeans with imported profile from old installation. I copy MinGW and my project folders over to the new PC. But then none of them works.</p>
  
  <p>I create a Hello World C++ program. Clean &amp; Build on NetBean ok, but when Run it said <code>RUN FAILED</code>. Run it on dos prompt, it said <code>The application was unable to start correctly (0xc0000013)</code>. Changed the file extension of the source from <code>.cpp</code> to <code>.c</code>, it works fine. Searched the net, found <code>[MS-ERREF].pdf</code> the error code means <code>STATUS_NO_MEDIA_IN_DEVICE</code> which doesn't seem related.</p>
  
  <p>Search further, found a software <code>Dependency Walker</code>, run it and found that <code>Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.</code> Went through the DLL tree and found 3 export points missing: <code>InterlockedExchange in KERNEL32.DLL</code>, <code>__p__environ in MSVCRT.DLL</code> and <code>__p__fmode in MSVCRT.DLL</code>. I can find <code>__p__environ</code> in MinGW's <code>include\stdlib.h</code> but not <code>__p__fmode</code>. </p>
  
  <p>Some posts said that mixing 64 bits dll with 32 bits appn may be the cause. But my projects are all mixed and they worked well in my old PC. Appreciate if anyone can tell me where to look for the causes.</p>
  
  <p>EDIT:
  Further testing my <code>Hello World</code> program and found that if I use cpp header, like <code>#include &lt;cstdlib&gt;</code> or <code>#include &lt;iostream&gt;</code>, the compiler cannot find them. So I re-install MinGW but it makes things worse. Now I cannot even compile any cpp, with or without cpp's <code>#include</code>. Clean &amp; Build the program lead to</p>
  
  <pre><code>make.exe[2]: *** [build/Debug/MinGW-Windows/TestCPP.o] Error 1
  make.exe[2]: Leaving directory `/f/NetBeans_Projects/test-cpp'
  make.exe[1]: *** [.build-conf] Error 2
  make.exe[1]: Leaving directory `/f/NetBeans_Projects/test-cpp'
  make.exe": *** [.build-impl] Error 2
  </code></pre>
  
  <p>Please help.</p>