# How to Install the Latest GCC on Windows

DevFeed: [How to Install the Latest GCC on Windows](<https://devfeed.tech/articles/how-to-install-the-latest-gcc-on-windows-20997.md>)

Original publisher: [Read original article](<https://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows>)

Author: Jeff Preshing

Published: 2014-11-08T15:50:00Z

Content type: tutorial

Language: en

Sources: [Jeff Preshing](<https://devfeed.tech/sources/jeff-preshing.md>)

Topics: [gcc](<https://devfeed.tech/topics/gcc.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [building](<https://devfeed.tech/tags/building.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [download](<https://devfeed.tech/tags/download.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [source](<https://devfeed.tech/tags/source.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

A guide to installing the latest GCC compiler on Windows by using Cygwin. It covers installing Cygwin, adding the packages required to build GCC, compiling GCC from source, and testing the resulting compiler in C++14 mode.

## Source excerpt

Several modern C++ features are currently missing from Visual Studio Express, and from the system GCC compiler provided with many of today's Linux distributions. Generic lambdas - also known as polymorphic lambdas - are one such feature. This feature is, however, available in the latest versions of GCC and Clang. The following guide will help you install the latest GCC on Windows, so you can experiment with generic lambdas and other cutting-edge C++ features. You'll need to compile GCC from sources, but that's not a problem. Depending on the speed of your machine, you can have the latest GCC up and running in as little as 15 minutes. The steps are: Install Cygwin, which gives us a Unix-like environment running on Windows. Install a set of Cygwin packages required for building GCC. From within Cygwin, download the GCC source code, build and install it. Test the new GCC compiler in C++14 mode using the -std=c++14 option. [Update: As a commenter points out, you can also install native GCC compilers from the MinGW-w64 project without needing Cygwin.] 1. Install Cygwin First, download and run either the 32- or 64-bit version of the Cygwin installer, depending on your version of Windows. Cygwin's setup wizard will walk you through a series of steps. If your machine is located behind a proxy server, make sure to check "Use Internet Explorer Proxy Settings" when you get to the "Select Your Internet Connection" step. When you reach the "Select Packages" step (shown below), don't bother selecting any packages yet. Just go ahead and click Next. We'll add additional packages from the command line later. After the Cygwin installer completes, it's very important to keep the installer around. The installer is an executable named either setup-x86.exe or setup-x86_64.exe, and you'll need it to add or remove Cygwin packages in the future. I suggest moving the installer to the same folder where you installed Cygwin itself; typically C:\cygwin or C:\cygwin64. If you already have Cygwin