๐ Install MinGW Compiler on Windows (Step-by-Step Guide)
What is the MinGW Compiler?
๐ 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
Key Features of MinGW
- Lightweight โ MinGW provides only the essential compilers and tools, making it a minimal setup for Windows development.
- Native Windows Executables โ Unlike Cygwin, which provides a Unix-like environment, MinGW produces pure Windows executables that do not require additional runtime dependencies.
- Includes GCC โ MinGW provides the GCC compiler (g++, gcc), linker, and other essential tools.
- Supports Windows API โ You can use Windows system libraries and APIs in C and C++ programs.
- Portable โ MinGW can be installed and used without modifying system files.

Components of MinGW
MinGW comes with the following tools:
gccโ C compilerg++โ C++ compilergdbโ GNU Debuggermakeโ Build system toolmingw32-makeโ Windows-specific version of Makebinutilsโ 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:
dwarffor 32-bit,sehfor 64-bit - Installation Directory: Choose
C:\mingw-w64or 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
Pathvariable. - 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