-1

I've tried to compile my source files using minGW-w64, because of new C++14 standard but when i try to compile i got this error even all things and setup is allright i guess:

Execution of 'g++.exe -c C:\Users\Denis\Desktop\isocpp.cpp -o C:\Users\Denis\Desktop\isocpp.o' in 'C:\Users\Denis\Desktop' failed.

MinGW-w64 Screenshot

My PC version is 32bit, from the official site i was notified that MinGW-w64 works for 64-32bit.

M.M
  • 130,300
  • 18
  • 171
  • 314
  • If you have a 32-bit Windows version you can't execute 64-bit apps. It sounds like you've installed a 64-bit binary somehow. Did you use the [official installer](http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download), or did you download some random repackaged build? – M.M Dec 23 '15 at 22:41
  • I installed from this thread: http://stackoverflow.com/questions/31171979/enabling-std-c14-flag-in-codeblocks , it seems that this mingw download link was x64 only, and I miss understood from the official site 64-32bit version, im trying this, thanks! – Denis Balaj Dec 23 '15 at 22:46
  • OK, if you followed the link to the nuwen.net repackaging site, that page does indeed say that it only has 64-bit native binaries – M.M Dec 23 '15 at 22:48
  • Why did you not follow the instructions, and check with the publisher? minGW-**w64** / Windows 10 **32-bit** hum maybe a problem here...!! – Lightness Races in Orbit Dec 23 '15 at 23:02
  • @LightnessRacesinOrbit despite the name, it does actually publish 64-bit and 32-bit binaries (and also targets both 64-bit and 32-bit) – M.M Dec 23 '15 at 23:03
  • @M.M: I said "maybe" - it's a big clue to the OP to check bitness _with the publisher_ :) – Lightness Races in Orbit Dec 23 '15 at 23:04
  • @LightnessRacesinOrbit i just miss understood the publisher and the official installer. – Denis Balaj Dec 24 '15 at 14:22
  • @DenisBalaj: Okie doke – Lightness Races in Orbit Dec 24 '15 at 14:28

1 Answers1

0

There are two distinctions to make here:

  • Whether gcc.exe is a 32-bit binary or a 64-bit binary
  • Whether that binary will generate programs that target 32-bit or 64-bit

mingw-w64 supports all four possible combinations here. But it sounds like you have downloaded a 64-bit binary. 32-bit Windows cannot run 64-bit binaries.

To fix this, use the official installer (warning:Sourceforge, although it is not hosted anywhere else so far as I know), or look out when downloading prepackaged builds.

M.M
  • 130,300
  • 18
  • 171
  • 314