Mingw Installer For Windows 10

Posted on  by 

Installer

Install MinGW. MinGW means Minimalist GNU for Windows: GNU is a source of open source programming tools (GNU stands for GNU is Not Unix). In this handout you will download the files needed by GNU C; in the next you will download a version of Eclipse that is already set up to use MinGW. MinGW Windows 10 – Minimalist free and open source GNU software for Windows PC. Download MinGW for Windows PC from Win10Fix.com. 100% Safe and Secure Free Download (32-bit/64-bit) Latest Version 2019.

  • Related Questions & Answers
  • Selected Reading

There are several alternatives for compiling C++ on windows. Let's look at 2 of them:

GCC

To install GCC on Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation program which should be named MinGW-<version>.exe.

While installing MinGW, at a minimum, you must install gcc-core, gcc-g++, Binutils, and the MinGW runtime, but you may wish to install more.

Add the bin subdirectory of your MinGW installation to your PATH environment variable so that you can specify these tools on the command line by their simple names.

Mingw Offline Installer Windows 10

When the installation is complete, you will be able to run gcc, g++, ar, ranlib, dlltool, and several other GNU tools from the Windows command line.

For a detailed installation guide, visit: https://www.compile.work/guides/installation/windows/gcc.html

Dev C++

If you'd rather use an IDE for C++ development, you can install the devC++ compiler/IDE for windows. Download the exe file from https://bloodshed-dev-c.en.softonic.com/ and follow the instructions there to install it. Installation is pretty straightforward.

Active1 year, 11 months ago

is there any way to install mingw-w64 offline ? I tried many official sources and all of them seem to need some sort of internet access. I'm looking for something that works for both x32 and x64 systems. I tried to have a look at the official repository but I am not sure which files I need for this task.

Thanks in advance !

Costi IvanCosti Ivan
Mingw

2 Answers

Although the following isn't fully tested yet, an offline installer seems unnecessary. Based on some screenshots for a bug report, the online installer asks the following questions...

Installing Mingw Windows 10

The first 5 options are used to choose a single download package. I don't know about you, but I've no idea what to choose for threads and exceptions. Based purely on download stats, posix threads are used more than twice as much as win32, seh seems much more popular for 64-bit, dwarf for 32-bit, sjlj seems pretty unloved. I'm guessing 32-bit with posix and dwarf is the default.

To identify what the choices are, it uses a file repository.txt from this folder. That's just a pipe-separated text file - 5 fields for those 5 main options, plus one for the URL of the package to download.

Incidentally, if anyone knows where to find the source code for the installer, I'd really appreciate a comment - I've hunted high and low, found e.g. bug reports, but not found the source of the installer. Sources for mingw-64 binary packages are easy enough to find, though.

The binary packages themselves are in subfolders of this folder (Win32) and this folder (Win64).

I'm not sure what the shortcuts the installer offers to create are for - this is MinGW-w64, not MSYS or MSYS2, so there's no bash-based shell to provide shortcuts to. Probably they're just Windows command prompt shortcuts with the path set up.

Other than that shortcuts issue, all you do is unpack the package to a suitable folder, make sure that the mingw32bin or mingw64bin folder is on the path somehow, and you should be done. I've already tested this with one of the 32-bit gcc-5.4.0 packages - g++ compiled a hello-world with no problems.

There are alternative third-party builds in subfolders starting from one step further out here (32 bit) and similar subfolders of different Toolchains targetting * folders for 64-bit and other builds. ray_linn has various builds that include Ada (and Objective C/C++?) support. rubenvb has some older GCC and Clang versions. dongsheng-daily looks like daily builds, even including experimental GCC 7.

If you need MSYS too, let me know in comments. I've been installing that offline (along with MinGW32) for some time, so I have a list of which packages to install. You need quite a few packages, it's a pain getting them from SourceForge, but once you have them it's mostly just unpacking again. There's some minor 'postinstall' to do - some file to create, mainly where to find MinGW, plus creating a shortcut to the shell. I have AutoIt scripts to do that - a bit of a mess, using inappropriate methods because they were what I knew in AutoIt at the time, but they work OK.

There's MSYS2, but at first glance that's another online-installing-assumed issue, using the pacman package manager - probably very convenient, but not for the minority who can't use it.

Steve314Steve314
22.3k10 gold badges53 silver badges110 bronze badges

Yes, you can install mingw-w64 offline if you use MSYS2's pacman on your internet-facing machine first, then transfer the files downloaded by pacman to your offline machine.

To your question, the great thing about pacman is it will grab the right versions of all dependencies.

On your internet-facing machine:

  1. Use MSYS2 installer from http://www.msys2.org/
  2. Run MSYS2, and update the package database with pacman -Syu
  3. In your MSYS2 terminal, create a folder to contain the packages you want (i.e. mingw-w64)

  4. Use pacman's repo-add script to bundle up everything into a database:

  5. Copy the MSYS2 installer AND ~/offline_packages to your external flash drive.

On your offline machine:

  1. Install MSYS2.
  2. Copy the offline_packages folder from your flash drive to a path MSYS2 can access (e.g. C:/msys64/home/user/offline_packages)
  3. Edit C:/msys64/etc/pacman.conf

    1. Comment out the [mingw32], [mingw64], [msys] repositories.
    2. Add a new repository. This example uses the arbitrary path given above. Modify to point to wherever you copied the offline_packages folder.

  4. In an MSYS2 terminal, synchronize the pacman database with your new repository

  5. Install mingw-w64, etc.

  6. Done!

References:https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Installation_and_recovery

AaronDanielsonAaronDanielson

Not the answer you're looking for? Browse other questions tagged mingw-w64 or ask your own question.

Coments are closed