title: Cannot run program makefile when compiling a c++ program with NetBeans and MinGW gcc
body: <p>I'm trying to compile a simple "Hello" program on Windows 7 x64: </p>
  
  <pre><code>#include &lt;cstdlib&gt; 
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main(int argc, char** argv) {
      cout &lt;&lt; "Hello" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>And getting an error in the NetBeans IDE when compiling:</p>
  
  <blockquote>
    <p>CLEAN SUCCESSFUL (total time: 126ms)</p>
  </blockquote>
  
  <pre><code>D:\GDrive\CS\Cpp\NetBeans_Cpp\TNB_cpp\Tut1_10_HelloWorld\Makefile -f nbproject/Makefile-Debug.mk build/Debug/MinGW-Windows/main.o
  Cannot run program "D:\GDrive\CS\Cpp\NetBeans_Cpp\TNB_cpp\Tut1_10_HelloWorld\Makefile" (in directory "D:\GDrive\CS\Cpp\NetBeans_Cpp\TNB_cpp\Tut1_10_HelloWorld"): CreateProcess error=193, %1 is not a valid Win32 application
  
  COMPILE FILE FAILED (exit value -2, total time: 16ms)
  </code></pre>
  
  <p>My PATH env variable looks like this:</p>
  
  <pre><code>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;F:\Program_Files\JDK\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;F:\Program_Files\MinGW\bin;F:\Program_Files\MinGW\msys\1.0\bin;
  </code></pre>
  
  <p>The last two varibles being probably the most important since they pertain to the MinGW. My ideas is that something is missing in the PATH, but maybe its not where the problem hiddes. </p>
  
  <p>Thanks.</p>