title: "Cannot execute binary file" when running compiled c++ programs with Eclipse on Ubuntu for Windows platform
body: <p>I would like to move from Visual Studio on Windows platform to Eclipse on Ubuntu for c++ development, since I develop almost all my programs on Java, with Eclipse, and I just use a Windows virtual machine in order to develop C++ programs for Win OS. So if I would be happy being able to not use Windows VM at all. However, I've managed to configure MinGW and Eclipse successfully enough to compile programs, but not to execute them.</p>
  
  <p>Steps I've gone through so far:</p>
  
  <p>I've installed mingw32 package and dependencies:</p>
  
  <pre><code>$ sudo apt-get install mingw32
  </code></pre>
  
  <p>I've installed Eclipse Mars for C/C++ development (manually, to keep this installation isolated from other Eclipses I have) and created a new project in this way:</p>
  
  <pre><code>- New C++ project.
  - [...]
  - Cross-prefix: i586-mingw32msvc-
  - Cross path: /usr/bin/
  </code></pre>
  
  <p>With this configuration I'm able to correctly build a .exe which I can successfully execute on Windows, but when trying to debug it or execute it under Eclipse I get this error: "cannot execute binary file".</p>
  
  <p>Googleing I've seen some posts suggesting to use wine in order to execute the .exe, but I thought mingw32 would be able to execute it. Am I wrong and this is not possible or just doing something wrong?</p>