โ† Back to list

๐Ÿš€ Install MinGW Compiler on Windows (Step-by-Step Guide)

What is the MinGW Compiler?

Aniket_Bakre in CodeX ยท 2025-03-10 09:09 ยท 0 claps ยท 2.3 min read paywalled
#mingw #gcc #cprogrammingapp #cpp-programming #open-source
Open on Medium โ†—
Wiki topics: ๐Ÿ’ป ยท Programming ๐Ÿ”“ ยท Open Source

๐Ÿš€ Install MinGW Compiler on Windows (Step-by-Step Guide)

What is the MinGW Compiler?

MinGW (Minimalist GNU for Windows) is a free and open-source compiler for Windows that allows you to compile and run C, C++, and Fortran programs. It provides GCC (GNU Compiler Collection) tools for Windows, enabling developers to build native Windows applications without needing an emulator like Cygwin.

I have made a detailed video on that.

[embed]If you like and think helpful, please follow share and subscribe my channel.

Website for MinGW

Website for MinGW

Key Features of MinGW

  1. Lightweight โ€” MinGW provides only the essential compilers and tools, making it a minimal setup for Windows development.
  2. Native Windows Executables โ€” Unlike Cygwin, which provides a Unix-like environment, MinGW produces pure Windows executables that do not require additional runtime dependencies.
  3. Includes GCC โ€” MinGW provides the GCC compiler (g++, gcc), linker, and other essential tools.
  4. Supports Windows API โ€” You can use Windows system libraries and APIs in C and C++ programs.
  5. Portable โ€” MinGW can be installed and used without modifying system files.

Components of MinGW

MinGW comes with the following tools:

  • gcc โ€“ C compiler
  • g++ โ€“ C++ compiler
  • gdb โ€“ GNU Debugger
  • make โ€“ Build system tool
  • mingw32-make โ€“ Windows-specific version of Make
  • binutils โ€“ Tools for managing object files, archives, and binaries

MinGW vs. MinGW-w64

MinGW-w64 is an extended version of MinGW that:

  • Supports both 32-bit and 64-bit systems.
  • Has better threading support (via POSIX or Windows threads).
  • Offers active development (MinGW is no longer maintained).

If youโ€™re starting with MinGW, itโ€™s recommended to use MinGW-w64 instead.

Use Cases of MinGW

  • Compiling C and C++ programs on Windows.
  • Developing Windows applications with the Windows API.
  • Creating cross-platform C/C++ applications.

Would you like help setting up MinGW-w64 on Windows? ๐Ÿš€

To install the MinGW compiler on Windows, follow these steps:

Method 1: Install MinGW via winlibs

Download MinGW-w64

  • Go to the official website: https://winlibs.com/
  • Under โ€œDownloadโ€, select Release Versions and from that download the latest version.

Install MinGW

  • Run the installer (mingw-w64-install.exe).
  • Select the following options:
  • Version: Latest stable version
  • Architecture: x86_64 (for 64-bit systems) or i686 (for 32-bit systems)
  • Threads: posix (recommended for better thread support)
  • Exception: dwarf for 32-bit, seh for 64-bit
  • Installation Directory: Choose C:\mingw-w64 or any other suitable location.

  • Click Install and wait for the process to complete.

Set Environment Variables

  • Open the Start Menu, search for โ€œEnvironment Variablesโ€, and open it.
  • Under System Variables, find and edit the Path variable.
  • Click New and add the MinGW bin path:
C:\mingw-w64\mingw64\bin
  • Click OK to save the changes.

Verify Installation

  • Open Command Prompt (cmd) and run:
g++ --version
  • If installed correctly, it will display the installed MinGW version.
  • Thats all Now you are ready to use compiler for C++. In my next post we can see how it configure to VS code.
  • ๐Ÿš€Happy coding!!

๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
82d2a0b04de5
slug
install-mingw-compiler-on-windows-step-by-step-guide-82d2a0b04de5
url
https://medium.com/codex/install-mingw-compiler-on-windows-step-by-step-guide-82d2a0b04de5
canonical_url
https://medium.com/codex/install-mingw-compiler-on-windows-step-by-step-guide-82d2a0b04de5
author_url
https://medium.com/@aniketbakre1291
status
ok
fetched_at
2026-06-26 06:47:43