Search code examples
mingwmingw-w64

MinGW-w64 installation fails with 'ERROR res' in windows 10


The latest online installer (mingw-w64-install.exe from SourceForge) fails with 'Error res' message in the middle of installation. About several students out of 50 in my class were not able to install it. They had to use MinGW instead. All our efforts such as uninstalling, rebooting, cleaning up env variables and/or installing it in a new folder did not resolve the problem.

I know that the exact same problem was reported a few years back and fixed at that time. I am afraid that the same bug sneaked in the recent installation script.

By the way, a couple of my students reinstalled windows10 and then were able to install mingw-w64 successfully.

Is there a way to get around installing mingw-w64 without using mingw-w64-install.exe?


Solution

  • Is there a way to get around installing mingw-w64 without using mingw-w64-install.exe?

    The individual archives that form the MinGW-w64 installation can be downloaded and unpacked manually. The "installer" does only a little on top of this. Just pick an archive at this page:

    https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64

    However, a very practical alternative approach is to install MinGW-w64 as part of MSYS2, which is very similar to Cygwin, but has some advantages:

    1. It comes with a command-line package manager (pacman)
    2. It offers always the newest MinGW-w64/GCC combo available.
    3. You can also install many other packages compatible with this toolchain.

    For details see this answer.