While mingw-w64 provides the core Windows headers and libraries needed for
Windows development, it’s not very useful on its own. Most users should install
a pre-built toolchain that combines mingw-w64 with a compiler (like GCC with
binutils, or LLVM/Clang) and other essential build components. These
distributions package everything needed to compile programs for Windows and are
much easier to set up than building from source.
Version | Host | GCC / mingw-w64 Version | Languages | Additional Software in Package Manager | |
---|---|---|---|---|---|
Arch Linux |
Rolling | Linux | 14.2.0/12.0.0 | Ada, C, C++, Fortran, Obj-C, Obj-C++ | many |
Cygwin |
Rolling | Windows | 12.4.0/12.0.0 | C, C++, Fortran, Obj-C | many |
Debian |
Debian 10 (Buster) | 8.3.0/6.0.0 | Ada, C, C++, Fortran, Obj-C, Obj-C++ | 9 (gdb, libassuan, libgcrypt, libgpg-error, libksba, libnpth, nsis, win-iconv, zlib) | |
Debian 11 (Bullseye) | 10.2.1/8.0.0 | ||||
Debian 12 (Bookworm) | 12.0.0/10.0.0 | ||||
Fedora |
Fedora 40 | 14.1.1/11.0.1 | Ada, C, C++, Fortran, Obj-C, Obj-C++ | many | |
Fedora 41 | 14.2.1/12.0.0 | ||||
LLVM-MinGW | 20240518 | Windows, Linux, macOS | LLVM 18.1.6/trunk | C, C++ | make, Python |
MacPorts |
Rolling | macOS | 14.2.0/12.0.0 | C, C++, Fortran, Obj-C, Obj-C++ | 1 (nsis) |
MinGW-W64-builds | Rolling | Windows | 13.1.0/11.0.0 | C, C++, Fortran | 4 (gdb, libiconf, python, zlib) |
MSYS2 |
Rolling | Windows | 14.2.0/trunk | Ada, C, C++, Fortran, Obj-C, Obj-C++, OCaml | many |
Ubuntu |
20.04 Focal Fossa | 9.3.0/7.0.0 | Ada, C, C++, Fortran, Obj-C, Obj-C++ | 9 (gdb, libassuan, libgcrypt, libgpg-error, libksba, libnpth, nsis, win-iconv, zlib) | |
22.04 Jammy Jellyfish | 10.3.0/8.0.0 | ||||
24.04 Noble Numbat | 13.2.0/11.0.1 | ||||
24.10 Oracular Oriole | 14.1.0/12.0.0 | ||||
w64devkit | 2.0.0 | Windows | 14.2.0/12.0.0 | C, C++, Fortran |
8 (busybox, cppcheck, ctags, gdb, make, nasm, pkg-config, vim) |
WinLibs.com | Rolling | Windows | 13.2.0 | Ada, C, C++, Fortran, Obj-C, Obj-C++, Assembler | Package manager: work in progress (will offer > 2500 packages) |
Arch Linux
Installation:
- Extra repository (toolchain)
- AUR repository (additional packages)
Cygwin
Cygwin is a Unix-like environment and command-line
interface for Microsoft Windows. Its core is the cygwin1.dll library which
provides POSIX functionality on top of the Win32 API. It can be used as a build
environment which targets Windows directly and for which output doesn’t depend
on cygwin1.dll.
Installation is done through cygwin’s package manager:
setup.exe.
As part of the numerous packages in cygwin, there are cross-compilation
toolchains which target both 32 bits and 64 bits; their names start with
“mingw64-”.
Once they are installed, they should be used according to the general
cross-compilation approach.
Debian
Installation: through integrated package manager.
mingw-w64 packages on Debian
Fedora
Installation: through integrated package manager.
LLVM-MinGW
LLVM-MinGW is a toolchain built with Clang, LLD, libc++, targeting
i686, x86_64, arm and aarch64 (ARM64), with releases both for running
as a cross compiler from Linux and for running on Windows. It supports
Address Sanitizer, Undefined Behaviour Sanitizer, and generating debug
info in PDB format.
Installation: GitHub
MacPorts
To install just the 32-bit or just 64-bit compiler with dependencies, use:
sudo port install i686-w64-mingw32-gcc
sudo port install x86_64-w64-mingw32-gcc
A shortcut to install both:
sudo port install mingw-w64
Here is the list of mingw-w64 packages on MacPorts.
MinGW-W64-builds
Installation: GitHub
MSYS2
Installation: GitHub
Ubuntu
Installation: through integrated package manager.
mingw-w64 packages on Ubuntu
w64devkit
w64devkit is a portable C and C++ development kit for x64 (and x86) Windows.
Included tools:
- mingw-w64 GCC : compilers, linker, assembler
- GDB : debugger
- GNU Make : standard build tool
- busybox-w32 : standard unix utilities, including sh
- Vim : powerful text editor
- Universal Ctags : source navigation
- NASM : x86 assembler
- Cppcheck : static code analysis
The toolchain includes pthreads, C++11 threads, and OpenMP. All included
runtime components are static.
Installation: GitHub
WinLibs.com
Standalone mingw-w64+GCC builds for Windows, built from scratch (including all dependencies) natively on Windows for Windows.
Downloads are archive files (.zip
or .7z
). No installation is required,
just extract the archive and start using the programs in mingw32\bin
or mingw64\bin
.
This allows for a relocatable compiler suite and allows having multiple versions on the same system.
Also contains other tools including:
- GDB — the GNU Project debugger
- GNU Binutils — a collection of binary tools
- GNU Make — a tool which controls the generation of executables and other non-source files
- Yasm — The Yasm Modular Assembler Project
- NASM — The Netwide Assembler
- JWasm — A free MASM-compatible assembler
Flavors:
- separate packages for 32-bit (i686) and 64-bit (x86_64) Windows
- separate packages for MSVCRT and UCRT builds
- only POSIX threads builds (which also include Win32 API thread functions)
- exception model: Dwarf for 32-bit (i686) and SEH for 64-bit (x86_64)
Installation: Download from winlibs.com and extract archive (no installation needed).
Unsorted complementary list
GCC with the MCF thread model
GCC with the MCF thread model is a series of
x86 and x64 native toolchains built by LH_Mouse. The MCF thread model has been
merged into GCC 13, and can be enabled by passing --enable-threads=mcf
to
GCC’s configure script. C++11 threading facilities, such as std::thread
,
std::mutex
, std::condition_variable
, std::call_once
, thread_local
etc.
invoke the mcfgthread library, which
implements them on Windows syscalls in a more standard-compliant and more
efficient way, outperforming even native slim reader/write locks (SRW) since
Windows Vista.
OpenSUSE
The OpenSUSE Linux distribution also has a large and
well-maintained set of packages for cross-compilation.
MinGW-w64 — набор средств разработки для Windows, включает в себя компилятор GNU C/C++, отладчик gdb, профайлер gprof, системы сборки make и cmake и прочие утилиты комплекта GNU. MinGW расшифровывается, как Minimalistic Gnu for Windows. Проект отделился от проекта MinGW.
Сайт проекта: https://www.mingw-w64.org/
Установка mingw-w64
Существуют различные независимые сборки mingw-w64, большинство их которых распространяется в виде нескольких архивов, которые необходимо отдельно распаковывать. Разобраться в том, какие именно архивы нужно скачивать и распаковывать довольно сложно. Вариант установки с использованием exe-приложения, самостоятельно скачивающего нужные пакеты, к сожалению, содержит весьма устаревшую версию 8.1.0 компилятора.
Довольно простой способ установки (понадобится скачать только один архив) актуальной версии компилятора — это использование сайта winlibs.com.
Откройте этот сайт и перейдите к разделу «Download». Там будет довольно много разных ссылок на скачивание, расскажем как выбрать правильный архив, если вы не знаете в точности, что именно вам нужно.
Перейдите к разделу «Release versions» — «UCRT runtime». Выберите самую верхнюю версию MinGW в списке, она помечена, как LATEST. Вам нужна сборка с POSIX threads, версия для Win64. Если предлагаются варианты сборки с LLVM/Clang/LLD/LLDB, выберите вариант без (without) LLVM/Clang/LLD/LLDB (по крайней мере, если вы не знаете точно, что вам нужны именно LLVM/Clang/LLD/LLDB). Выберите zip-архив (если у вас установлен архиватор 7-zip, то можете скачать архив 7-zip, он меньше). То есть вам понадобится вот этот файл.
Выбор архива для скачивания mingw-w64 c winlibs.com
Прямая ссылка на скачивание архива с компилятором gcc 12.2.0 (последняя версия на февраль 2023): https://github.com/brechtsanders/winlibs_mingw/releases/download/14.2.0posix-19.1.1-12.0.0-ucrt-r2/winlibs-x86_64-posix-seh-gcc-14.2.0-mingw-w64ucrt-12.0.0-r2.zip
Внутри скачанного архива будет каталог mingw64. Распакуйте этот каталог на диск, лучше всего не использовать каталоги с пробелами или русскими буквами в именах (в том числе «Program Files»), поэтому лучше всего распаковать архив прямо в корень диска C:\. Далее будем считать, что у вас получился каталог C:\mingw64, внутри которого есть подкаталоги bin, include, lib, libexec, share и x86_64-w64-mingw32.
Добавление mingw-w64 в PATH
Для того, чтобы можно было использовать приложения из распакованного архива, а сторонние среды разработки, такие как Code::Blocks или Visual Studio Code могли найти компилятор, необходимо подкаталог bin из распакованного архива добавить в системную переменную Path.
Вам необходимо открыть окно «Свойства системы» панели управления Windows. Для этого нужно открыть проводник, сделать правый клик мышью на «Этот компьютер», выбрать «Свойства». Появится окно «Система — О системе», в котором нужно кликнуть на «Дополнительные параметры системы».
Или можно сразу открыть окно «Свойства системы», если нажать на Win+R, в строку «Открыть» ввести команду sysdm.cpl, затем нажать Enter.
В окне «Свойства системы» выберите вкладку «Дополнительно» и нажмите на «Переменные среды…». Верхний список — это переменные среды для текущего пользователя, нижний список — системные переменные. В списке системных переменных выберите Path и нажмите на кнопку «Изменить»… Нажмите на кнопку «Создать», в списке появится новая строка. Нажмите на кнопку «Обзор» и выберите каталог C:\mingw64\bin (или подкаталог bin подкаталога mingw64, если вы распаковали его в другое место). Нажмите на OK, затем на OK, затем на OK.
Подробней про переменные среды и их изменение можно прочитать здесь.
Проверка работы компилятора
После распаковки архива и добавления MinGW-w64 в Path, запустите командную строку. Нажмите на Win+R и введите команду cmd, затем нажмите Enter.
Наберите команду g++. Вы должны увидеть сообщение «g++: fatal error: no input files compilation terminated». Наберите команду
g++ --version
Вы увидите сообщение с версией компилятора. Убедитесь, что версия соответствует той, которую вы скачали.
Пример вывода g++ из командной строки для проверки работы и версии компилятора
MinGW-w64 (Minimalist GNU for Windows) is a popular software development environment for compiling native Windows applications. It offers a complete open-source programming environment that includes libraries and compilers. Unlike the original MinGW, MinGW-w64 supports both 32-bit and 64-bit Windows binaries and is more actively maintained. This guide will walk you through the process of installing MinGW-w64 on Windows 11, helping you set up a robust development environment to work on your projects.
Understanding the Prerequisites
Before diving into the installation process, it is vital to understand the prerequisites for successfully installing MinGW-w64. First, ensure that your Windows 11 operating system is fully updated, as this can solve potential compatibility issues during installation.
Next, you will need administrative rights on your computer. This permission allows the installation process to create directories and add environment variables without any hindrances. If you are unsure whether you have administrative rights, please check with your system administrator or proceed with the installation and grant permissions when prompted.
Downloading MinGW-w64
The first step in the installation process is to download MinGW-w64 from the official source. Follow these instructions to obtain the latest version:
-
Visit the official MinGW-w64 website:
Open your web browser and navigate to the MinGW-w64 GitHub repository or the official MinGW-w64 download page on SourceForge.- GitHub URL: MinGW-w64 GitHub Releases
- SourceForge URL: MinGW-w64 on SourceForge
-
Locate the Installer:
On the download page, you’ll find several files listed. For most users, the «mingw-w64-install.exe» or the latest installer file is the most straightforward option as it will guide you through the installation process. -
Download the Installer:
Click on the desired installer link, and the download should begin automatically. The file size may vary; make sure to check your internet connection stability during the download.
Running the Installer
Once the download is complete, we can proceed with the installation. Follow these steps to run the installer successfully:
-
Locate the downloaded file:
Go to your Downloads folder or the location where you saved the installer file. -
Run the installer:
Double-click the «mingw-w64-install.exe» file. If prompted by the User Account Control (UAC), click «Yes» to allow the installer to make changes to your system. -
Choose the installation settings:
- Architecture: You will be presented with the choice of the architecture to install. Choose between
x86_64
for 64-bit systems ori686
for 32-bit systems. For Windows 11, it is recommended to selectx86_64
. - Threads: Choose the threading model;
posix
is generally preferable for compatibility with POSIX-compliant systems. - Exception: Choose
seh
(Structured Exception Handling) for the architecture you selected, as it adds better support for debugging and exception handling.
- Architecture: You will be presented with the choice of the architecture to install. Choose between
-
Select the installation directory:
Next, you will be asked to choose the installation directory. You can use the default location or create a new directory (e.g.C:mingw-w64
). If you create a custom directory, remember to avoid spaces in the directory name as it may lead to complications later. -
Install:
Click the “Next” button, review your selections, and then click “Install” to begin the installation process. The installation may take a while, depending on your system specifications.
Once the installation process is complete, you will see a confirmation message. Click “Finish” to close the installer.
Adding MinGW-w64 to the System Path
To ensure that MinGW-w64 can be called from any command prompt window, you need to add it to the system PATH. This step allows you to invoke the gcc
(GNU Compiler Collection) compiler from any directory in the command prompt.
-
Open the System Properties:
Right-click on the «Start» button or pressWindows + X
and select «System.» In the System window, click on «Advanced system settings» on the left sidebar. -
Environment Variables:
In the System Properties window, click on the «Environment Variables» button at the bottom. -
Edit the PATH Variable:
Under the «System variables» section, scroll down and find the «Path» variable. Select it and click on «Edit.» -
Add a New Path:
In the Edit Environment Variable window, click «New» and add the path to thebin
directory of your MinGW-w64 installation. For example:C:mingw-w64mingw64bin
Adjust this path according to your installation directory.
-
Confirm Changes:
Click «OK» to close the Edit Environment Variable window, and then click «OK» again to close the Environment Variables window. Finally, click «OK» in the System Properties window.
Verifying the Installation
To verify that MinGW-w64 is installed correctly and available in your PATH, you can perform the following steps:
-
Open Command Prompt:
PressWindows + R
, typecmd
, and hit Enter to open the Command Prompt. -
Check GCC Version:
In the Command Prompt window, type the following command and press Enter:gcc --version
If MinGW-w64 is installed correctly, you should see output that includes the version of GCC and details about the compiler.
-
Test Compilation:
Create a simple «Hello, World!» C program to test the compilation process. Use Notepad or any text editor to create a file calledhello.c
with the following code:#include int main() { printf("Hello, World!n"); return 0; }
Save the file in a directory of your choice. Use the command prompt to navigate to that directory by typing
cd
followed by the path to your directory. Then, compile the program using:gcc hello.c -o hello.exe
After compiling, run the executable with:
hello.exe
If you see the message «Hello, World!» printed in the console, congratulations! You’ve successfully installed and tested MinGW-w64.
Configuring Code Editor or IDE
To improve your development experience, it is advisable to utilize a code editor or Integrated Development Environment (IDE) that complements MinGW-w64. Some popular choices include:
- Visual Studio Code (VS Code): A lightweight and versatile code editor that offers extensive features through extensions. You can install extensions for C/C++ to improve your coding experience.
- Code::Blocks: A free C/C++ IDE that is easy to set up and use with MinGW-w64.
- Eclipse CDT: A powerful IDE that supports C/C++ development. You’ll need to configure it to work with MinGW-w64.
To configure these programs, you typically need to specify the path to the MinGW-w64 installation in the settings. This process varies from one editor to another, so referring to the editor’s documentation is essential for proper configuration.
Setting Up Additional Tools
Once you’ve established a functional installation of MinGW-w64, consider integrating additional tools or libraries to enhance your development capabilities:
-
CMake: If you’re dealing with larger projects or libraries, using CMake can streamline your build process. Download and install CMake from its official website.
-
Git: For version control and managing your code repositories, Git is essential. Install it from the official Git website.
-
Debugger: Familiarize yourself with debugging tools. GDB is integrated into MinGW-w64, but you may also explore debugging plugins for your code editor.
-
Text Editors/IDEs Extensions: Depending on your coding needs, you might want to explore various extensions that help in debugging, porting, and enhancing the coding environment.
-
Libraries: Look into libraries you might want to use within your applications. Popular libraries like SDL, SFML, or OpenGL can often be compiled with MinGW-w64.
Conclusion
Installing MinGW-w64 on Windows 11 is a straightforward process that unleashes powerful development capabilities on your system. By following these steps, you’ve learned how to download, install, and configure MinGW-w64. Along with a well-chosen IDE or code editor, you’ll have a powerful environment to bring your software projects to life.
Whether you’re working on small projects or embarking on larger software development tasks, MinGW-w64 provides the tools necessary for success. With your new setup in place, you can dive into the world of C and C++ programming confidently, backed by the full power of the GNU Compiler Collection on Windows 11. Happy coding!
How to Install MinGW-w64 in Windows 11
Introduction
MinGW-w64 (Minimalist GNU for Windows) is a compiler suite for Windows that allows you to run and compile C and C++ programs. It is a port of the GNU Compiler Collection (GCC) and extends its functionality, particularly in the Windows environment. MinGW-w64 supports 32-bit and 64-bit Windows, provides native Windows headers, and yields executables that can run on all Windows systems.
This guide will walk you through the installation of MinGW-w64 on Windows 11, ensuring you can effectively compile software using this powerful toolchain.
Step 1: Downloading MinGW-w64
Before you can install MinGW-w64, you need to download the installer. You have several options for getting MinGW-w64, but it is generally recommended to use the official online installer provided by the MinGW-w64 project.
-
Visit the official MinGW-w64 website:
You can go to the MinGW-w64 website. There, you’ll find links for downloading the installer. -
Open the SourceForge page:
One of the reliable sources for downloading MinGW-w64 is its SourceForge page. You can access it by visiting MinGW-w64 SourceForge. -
Select the appropriate installer:
When you land on the SourceForge page, you will see various downloadable files. Click on the latest version that hasx86_64
for 64-bit orx86
for 32-bit, depending on your requirements. For most modern development needs, the 64-bit version is recommended. -
Downloading the installer:
After clicking the link, you might need to wait for a few seconds as SourceForge prepares your download. Once it is ready, the installer file (usually in.exe
format) will download to your computer.
Step 2: Running the Installer
Once the download completes, navigate to the directory where you saved the file, and follow these steps to install MinGW-w64.
-
Run the installer:
Double-click on the downloaded.exe
file to run it. You may see a security dialog; if so, click “Run” to continue. -
Choose Installation Mode:
The installation wizard will present you with several options. Choose «Installation Mode.» You can select either the «Use the MinGW-w64 Online Installer» or directly install using the downloaded installer. The online installer is generally more convenient as it fetches the latest versions during installation. -
Select Architecture:
On the next screen, you will have to choose the architecture of the binaries. Select «x86_64» for 64-bit or «i686» for 32-bit depending on your system. -
Select Threads and Exception:
Next, you will be prompted to choose the threading model. Typically,posix
is selected as it is compatible with most software development needs. For exceptions, selectseh
for 64-bit ordw2
for 32-bit, as these are standard for Windows development. -
Choose Installation Directory:
You can choose where to install MinGW-w64. The default location is usually fine, but ensure it is a path without spaces or special characters for optimal performance. -
Begin Installation:
Click “Next” and the installer will start downloading and installing the packages. This may take a little time depending on your internet speed and system performance. -
Finish Installation:
Once the installation is complete, you will see a message prompting you that the installation successfully terminated. You should now have MinGW-w64 installed on your system.
Step 3: Setting Up Environment Variables
After installation, you must set up the environment variables to use MinGW-w64 from the command line.
-
Access Environment Variables:
Right-click on the Start button and chooseSystem
. From theAbout
screen, selectAdvanced system settings
from the sidebar. This action will bring up theSystem Properties
dialog. -
Open Environment Variables:
In theSystem Properties
dialog, you will see anEnvironment Variables
button. Click on it. -
Edit Path Variable:
In theEnvironment Variables
window, look for thePath
variable in the «System Variables» section. Select it and click on theEdit
button. This action will lead you to a new window where you can add new entries to the Path. -
Add MinGW-w64 Path:
Click onNew
and add the path to thebin
directory of your MinGW-w64 installation. For instance, if you installed MinGW-w64 in the default directory, it would be something likeC:Program Filesmingw-w64x86_64-mingw32bin
. -
Save Changes:
ClickOK
to close the edit window, and then pressOK
again to close the Environment Variables window. Finally, clickOK
to exit the System Properties dialog.
Step 4: Verifying the Installation
Now that MinGW-w64 is installed and the environment variables are set, it is important to verify that everything is working as expected.
-
Open Command Prompt:
PressWin + R
to open the Run dialog, typecmd
, and hit Enter to open the Command Prompt. -
Check GCC version:
Type the following command in the Command Prompt:gcc --version
If MinGW-w64 is installed correctly, you will see information about the version of GCC installed.
-
Check G++ version:
Similarly, check the C++ compiler version by typing:g++ --version
Again, you should see the version information displayed on the terminal.
Step 5: Compiling a Simple Program
To further confirm that the installation is fully functional, let’s write and compile a simple C++ program.
-
Create a new C++ source file:
Use a text editor (like Notepad or Visual Studio Code) to create a new file namedhello.cpp
and paste the following code into it:#include int main() { std::cout << "Hello, MinGW-w64!" << std::endl; return 0; }
-
Save the file:
Ensure you save the file in a directory where you can easily locate it, for example,C:MinGWProjects
. -
Navigate to the file location in Command Prompt:
Use thecd
command in the Command Prompt to navigate to the directory where you savedhello.cpp
:cd C:MinGWProjects
-
Compile the program:
Run the following command to compile your program:g++ hello.cpp -o hello
This command tells the compiler to compile
hello.cpp
and create an output file namedhello.exe
. -
Run the compiled program:
Execute the compiled program by running:hello
If MinGW-w64 was installed correctly, you should see the output:
Hello, MinGW-w64!
Common Issues and Troubleshooting
During installation and usage, you may encounter various issues. Here are some common troubleshooting steps:
-
Installation Failure:
Ensure that you have a stable internet connection and that you ran the installer as an administrator. Also, ensure that your system meets the hardware and software requirements. -
Command Not Found Error:
If the Command Prompt returns"gcc: command not found"
or a similar message, this usually indicates that thebin
directory of MinGW-w64 is not added to your PATH. Double-check the environment variable setting. -
Compilation Errors:
If you get compilation errors, ensure your code is syntactically correct, and make sure you’re using the command prompt in the right directory where your source file is located. -
Using an IDE:
If you prefer a graphical interface for development, consider using an Integrated Development Environment (IDE) like Code::Blocks, Visual Studio, or CLion. These IDEs typically support MinGW-w64 as a compiler.
Conclusion
Installing MinGW-w64 on Windows 11 is a straightforward process that opens the door to a vast world of C/C++ development on Windows. By following the above steps, you can easily set up the MinGW-w64 environment, code applications, and compile programs with ease. Whether you are a beginner learning to code or an experienced developer needing a ready-to-use GCC compiler, MinGW-w64 offers a robust solution.
Make sure to explore additional options and configurations within MinGW-w64, as they can enhance your development experience and enable you to build more advanced applications. Happy coding!
mingw-w64
MinGW-W64 GCC-8.1.0 Mirror
Official Website: MinGW-W64
Installation Instructions
- Determine the MingGW architecture:
- Version: 8.1.0
- Architecture: i686 or x86_64
- i686: is the 32-bit version
- x86_64: is the 64-bit version of the OS (Recommended)
- Threads: posix or win32
- posix: Enable C++11/C11 multithreading features. (Recommended)
- Note: Makes libgcc depend on libwinpthreads, so that even if you don’t directly call pthreads API, you’ll be distributing the winpthreads DLL. There’s nothing wrong with distributing one more DLL with your application.
- win32: No C++11 multithreading features.
- posix: Enable C++11/C11 multithreading features. (Recommended)
- Exception: dwarf or sjlj
- seh: Available for 64-bit GCC 4.8 (x86_64) (Recommended)
- Performance: Zero overhead exception
- dwarf: Available for 32 bit only (i686).
- Performance: No permanent runtime overhead.
- sjlj: Available for 32 bit and 64 bit.
- Performance: ~15% in exception heavy code
- seh: Available for 64-bit GCC 4.8 (x86_64) (Recommended)
- Build revision: 0
Recommended for Windows 10 x64:
- Version = 8.1.0
- Architecture = x86_64 (x64 OS)
- Threads = posix (Allow threading)
- Exception = seh (Zero overhead exception)
- Build revision = 0
- Download the appropriate 7-zip (*.7z) file to your local machine:
- ARCHITECTURE-VERSION-THREAD-EXCEPTION-*.7z
Recommended for Windows 10 x64:
- x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
-
Unzip the 7-Zip file to C:\mingw-w64\mingw64
-
Add C:\mingw-w64\mingw64\bin to PATH
Batch File:
echo off
set PATH=C:\mingw-w64\mingw64\bin;%PATH%
rem echo %PATH%
rem cd "C:\mingw-w64\mingw64\bin"
cd "C:\"
"C:\WINDOWS\system32\cmd.exe"
- Open a new cmd.exe and verify the GCC compiler is setup.
Background
The mingw-w64-install.exe online installer is a minimal application that downloads the correct MingGW architecture version from SourceForge using a file lookup repository.txt here:
Home / Toolchains targetting Win32 / Personal Builds / mingw-builds / installer / repository.txt
Formatted as:
8.1.0|x86_64|posix|sjlj |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z
8.1.0|i686 |posix|sjlj |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/i686-8.1.0-release-posix-sjlj-rt_v6-rev0.7z
8.1.0|i686 |posix|dwarf|rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z
8.1.0|x86_64|posix|seh |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
8.1.0|i686 |win32|sjlj |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
8.1.0|x86_64|win32|sjlj |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
8.1.0|x86_64|win32|seh |rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/seh/x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z
8.1.0|i686 |win32|dwarf|rev0 |http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-win32/dwarf/i686-8.1.0-release-win32-dwarf-rt_v6-rev0.7z
The installer downloads the appropriate 7-Zip MinGW file and extracts the content to C:\wingw-w64 or C:\Program Files (x86)\mingw-w64. The \mingw64\bin is then registered with PATH environment.