Скачать компилятор gcc для windows 10

GCC releases may be downloaded from our mirror sites.

Download

GCC releases may be downloaded from our
mirror sites.

Important: these are source releases, so will be of little
use if you do not already have a C++ compiler installed.

As one option, there are
pre-compiled
binaries. for various platforms.

You can also retrieve our sources using Git.

GCC Timeline

The table is sorted by date. Please refer to our
development plan for future
releases and an alternative view of the release history.

Release Release date
GCC 12.2 August 19, 2022
GCC 10.4 June 28, 2022
GCC 9.5 May 27, 2022
GCC 12.1 May 6, 2022
GCC 11.3 April 21, 2022
GCC 11.2 July 28, 2021
GCC 9.4 June 1, 2021
GCC 8.5 May 14, 2021
GCC 11.1 April 27, 2021
GCC 10.3 April 8, 2021
GCC 10.2 July 23, 2020
GCC 10.1 May 7, 2020
GCC 9.3 March 12, 2020
GCC 8.4 March 4, 2020
GCC 7.5 November 14, 2019
GCC 9.2 August 12, 2019
GCC 9.1 May 3, 2019
GCC 8.3 February 22, 2019
GCC 7.4 December 6, 2018
GCC 6.5 October 26, 2018
GCC 8.2 July 26, 2018
GCC 8.1 May 2, 2018
GCC 7.3 January 25, 2018
GCC 5.5 October 10, 2017
GCC 7.2 August 14, 2017
GCC 6.4 July 4, 2017
GCC 7.1 May 2, 2017
GCC 6.3 December 21, 2016
GCC 6.2 August 22, 2016
GCC 4.9.4 August 3, 2016
GCC 5.4 June 3, 2016
GCC 6.1 April 27, 2016
GCC 5.3 December 4, 2015
GCC 5.2 July 16, 2015
GCC 4.9.3 June 26, 2015
GCC 4.8.5 June 23, 2015
GCC 5.1 April 22, 2015
GCC 4.8.4 December 19, 2014
GCC 4.9.2 October 30, 2014
GCC 4.9.1 July 16, 2014
GCC 4.7.4 June 12, 2014
GCC 4.8.3 May 22, 2014
GCC 4.9.0 April 22, 2014
GCC 4.8.2 October 16, 2013
GCC 4.8.1 May 31, 2013
GCC 4.6.4 April 12, 2013
GCC 4.7.3 April 11, 2013
GCC 4.8.0 March 22, 2013
GCC 4.7.2 September 20, 2012
GCC 4.5.4 July 2, 2012
GCC 4.7.1 June 14, 2012
GCC 4.7.0 March 22, 2012
GCC 4.4.7 March 13, 2012
GCC 4.6.3 March 1, 2012
GCC 4.6.2 October 26, 2011
GCC 4.6.1 June 27, 2011
GCC 4.3.6 June 27, 2011
GCC 4.5.3 April 28, 2011
GCC 4.4.6 April 16, 2011
GCC 4.6.0 March 25, 2011
GCC 4.5.2 December 16, 2010
GCC 4.4.5 October 1, 2010
GCC 4.5.1 July 31, 2010
GCC 4.3.5 May 22, 2010
GCC 4.4.4 April 29, 2010
GCC 4.5.0 April 14, 2010
GCC 4.4.3 January 21, 2010
GCC 4.4.2 October 15, 2009
GCC 4.3.4 August 4, 2009
GCC 4.4.1 July 22, 2009
GCC 4.4.0 April 21, 2009
GCC 4.3.3 January 24, 2009
GCC 4.3.2 August 27, 2008
GCC 4.3.1 June 6, 2008
GCC 4.2.4 May 19, 2008
GCC 4.3.0 March 5, 2008
GCC 4.2.3 February 1, 2008
GCC 4.2.2 October 7, 2007
GCC 4.2.1 July 18, 2007
GCC 4.2.0 May 13, 2007
GCC 4.1.2 February 13, 2007
GCC 4.0.4 January 31, 2007
GCC 4.1.1 May 24, 2006
GCC 4.0.3 March 10, 2006
GCC 3.4.6 March 06, 2006
GCC 4.1.0 February 28, 2006
GCC 3.4.5 November 30, 2005
GCC 4.0.2 September 28, 2005
GCC 4.0.1 July 7, 2005
GCC 3.4.4 May 18, 2005
GCC 3.3.6 May 3, 2005
GCC 4.0.0 April 20, 2005
GCC 3.4.3 November 4, 2004
GCC 3.3.5 September 30, 2004
GCC 3.4.2 September 6, 2004
GCC 3.4.1 July 1, 2004
GCC 3.3.4 May 31, 2004
GCC 3.4.0 April 18, 2004
GCC 3.3.3 February 14, 2004
GCC 3.3.2 October 17, 2003
GCC 3.3.1 August 8, 2003
GCC 3.3 May 13, 2003
GCC 3.2.3 April 22, 2003
GCC 3.2.2 February 05, 2003
GCC 3.2.1 November 19, 2002
GCC 3.2 August 14, 2002
GCC 3.1.1 July 25, 2002
GCC 3.1 May 15, 2002
GCC 3.0.4 February 20, 2002
GCC 3.0.3 December 20, 2001
GCC 3.0.2 October 25, 2001
GCC 3.0.1 August 20, 2001
GCC 3.0 June 18, 2001
GCC 2.95.3 March 16, 2001
GCC 2.95.2 October 24, 1999
GCC 2.95.1 August 19, 1999
GCC 2.95 July 31, 1999
EGCS 1.1.2 March 15, 1999
EGCS 1.1.1 December 1, 1998
EGCS 1.1 September 3, 1998
EGCS 1.0.3 May 15, 1998
EGCS 1.0.2 March 16, 1998
gcc 2.8.1 March 2, 1998
gcc 2.8.0 January 7, 1998
EGCS 1.0.1 January 6, 1998
EGCS 1.0 December 3, 1997
2.7.2.3 August 22, 1997
2.7.2.2 January 29, 1997
2.7.2.1 June 29, 1996
2.7.2 November 26, 1995
2.7.1 November 12, 1995
2.7.0 June 16, 1995
2.6.3 November 30, 1994
2.6.2 November 12, 1994
2.6.1 November 1, 1994
2.6.0 July 14, 1994
2.5.8 January 24, 1994
2.5.7 December 12, 1993
2.5.6 December 3, 1993
2.5.5 November 27, 1993
2.5.4 November 16, 1993
2.5.3 November 11, 1993
2.5.2 November 1, 1993
2.5.1 October 31, 1993
2.5.0 October 22, 1993
2.4.5 June 20, 1993
2.4.4 June 19, 1993
2.4.3 June 1, 1993
2.4.2 May 31, 1993
2.4.1 May 26, 1993
2.4.0 May 17, 1993
2.3.3 December 26, 1992
2.3.2 November 27, 1992
2.3.1 November 1, 1992
2.3 October 31, 1992
2.2.2 June 14, 1992
2.2.1 June 9, 1992
2.2 June 8, 1992
2.1 March 24, 1992
2.0 February 22, 1992
1.42.0 (g++) September 20, 1992
1.42 September 20, 1992
1.41 August 27, 1992
1.41.0 (g++) July 13, 1992
1.40.3 (g++) October 19, 1991
1.40 June 1, 1991
1.39.1 (g++) May 4, 1991
1.39 January 16, 1991
1.38 December 21, 1990
1.37.1 (g++) March 1, 1990
1.37.0 (g++) February 28, 1990
1.37.1 February 21, 1990
1.37 February 11, 1990
1.36.4 (g++) January 30, 1990
1.36.3 (g++) January 16, 1990
1.36 September 24, 1989
1.35 April 26, 1989
1.34 February 23, 1989
1.33 February 1, 1989
1.32 December 21, 1988
1.31 November 19, 1988
1.30 October 13, 1988
1.29 October 6, 1988
1.28 September 14, 1988
1.27 September 5, 1988
1.26 August 18, 1988
1.25 August 3, 1988
1.24 July 2, 1988
1.23 June 26, 1988
1.22 May 22, 1988
1.21 May 1, 1988
1.20 April 19, 1988
1.19 March 29, 1988
1.18 February 4, 1988
1.17 January 9, 1988
1.16 December 19, 1987
1.15.3 (g++) December 18, 1987
1.15 November 28, 1987
1.14 November 6, 1987
1.13 October 12, 1987
1.12 October 3, 1987
1.11 September 5, 1987 (announced late)
1.10 August 22, 1987
1.9 August 18, 1987 (never announced)
1.8 August 10, 1987
1.7 July 21, 1987
1.6 July 2, 1987
1.5 June 18, 1987
1.4 June 13, 1987
1.3 June 10, 1987
1.2 June 1, 1987
1.1 May 24, 1987
1.0 May 23, 1987
0.9 (first beta release) March 22, 1987

GCC is distributed via git and via
HTTPS as tarballs compressed with gzip or bzip2.

Please refer to the releases web page
for information on how to obtain GCC.

The source distribution includes the C, C++, Objective-C, Fortran,
and Ada (in the case of GCC 3.1 and later) compilers, as well as
runtime libraries for C++, Objective-C, and Fortran.
For previous versions these were downloadable as separate components such
as the core GCC distribution, which included the C language front end and
shared components, and language-specific distributions including the
language front end and the language runtime (where appropriate).

If you also intend to build binutils (either to upgrade an existing
installation or for use in place of the corresponding tools of your
OS), unpack the binutils distribution either in the same directory or
a separate one. In the latter case, add symbolic links to any
components of the binutils you intend to build alongside the compiler
(bfd, binutils, gas, gprof, ld,
opcodes, …) to the directory containing the GCC sources.

Likewise the GMP, MPFR and MPC libraries can be automatically built
together with GCC. You may simply run the
contrib/download_prerequisites script in the GCC source directory
to set up everything.
Otherwise unpack the GMP, MPFR and/or MPC source
distributions in the directory containing the GCC sources and rename
their directories to gmp, mpfr and mpc,
respectively (or use symbolic links with the same name).


Return to the GCC Installation page

The heart of the Mingw-w64 project is headers and support libraries to
run the output of GCC on Windows. Since Mingw-w64 is neither the home of
GCC nor of binutils, several sets of installation packages which combine
them are available.

In addition, the sources are available but most people will want to grab
binaries directly..

Version Host GCC / Mingw-w64 Version Languages Additional Software in Package Manager
Arch Linux logo
Arch
Linux
Arch Linux 12.2.0/10.0.0 Ada, C, C++, Fortran, Obj-C, Obj-C++ many
Cygwin logo
Cygwin
Rolling Windows 11.3.0/10.0.0 C, C++, Fortran, Obj-C many
Debian logo

Debian
Debian 9 (Stretch) 6.3.0/5.0.1 Ada, C, C++, Fortran, Obj-C, Obj-C++, OCaml 9 (gdb, libassuan, libgcrypt, libgpg-error, libksba, libnpth, nsis, win-iconv, zlib)
Debian 10 (Buster) 8.3.0/6.0.0 Ada, C, C++, Fortran, Obj-C, Obj-C++
Debian 11 (Bullseye) 10.2.1/8.0.0
Fedora Linux logo
Fedora
Fedora 36 11.2.1/9.0.0 Ada, C, C++, Fortran, Obj-C, Obj-C++ many
Fedora 37 12.2.1/10.0.0
LLVM-MinGW 20220906 Windows, Linux LLVM 15.0.0/trunk C, C++ make, Python
w64devkit 1.17.0 Windows 12.2.0/10.0.0 C, C++, Fortran 7
(busybox,
cppcheck,
ctags,
gdb,
make,
nasm,
vim)
MacPorts logo
MacPorts
Rolling macOS 12.2.0/10.0.0 C, C++, Fortran, Obj-C, Obj-C++ 1 (nsis)
MingW-W64-builds Rolling Windows 12.2.0/10.0.0 C, C++, Fortran 4 (gdb, libiconf, python, zlib)
MSYS2 logo
MSYS2
Rolling Windows 12.2.0/trunk Ada, C, C++, Fortran, Obj-C, Obj-C++, OCaml many
WinLibs.com Rolling Windows 12.2.0 Ada, C, C++, Fortran, Obj-C, Obj-C++, Assembler Package manager: work in progress (will offer > 2500 packages)
Ubuntu logo
Ubuntu
18.04 Bionic Beaver 7.3.0/5.0.3 Ada, C, C++, Fortran, Obj-C, Obj-C++ 9 (gdb, libassuan, libgcrypt, libgpg-error, libksba, libnpth, nsis, win-iconv, zlib)
20.04 Focal Fossa 9.3.0/7.0.0
22.04 Jammy Jellyfish 10.3.0/8.0.0
22.10 Kinetic Kudu 10.3.0/10.0.0

Arch Linux

Installation:

  • Community repository (toolchain)
  • AUR repository (additional packages)

Ubuntu

Installation: through integrated package manager.

Mingw-w64 packages on Ubuntu

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

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

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-builds

Installation: GitHub

WinLibs.com

Standalone MinGW-w64+GCC builds for Windows, built from scratch (including all depencencies) 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 mingw32bin or mingw64bin.
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).

MSYS2

Installation: GitHub

Sources

Tarballs for the mingw-w64 sources are hosted on
SourceForge.

The latest version from the 10.x series is 10.0.0.

The latest version from the 9.x series is 9.0.0.

The latest version from the 8.x series is 8.0.2.

The latest version from the 7.x series is 7.0.0.

The latest version from the 6.x series is 6.0.0.

The latest version from the 5.x series is 5.0.4.

The old wiki has instructions for building
native
and
cross
toolchains.

Details on how to get the mingw-w64 code from Git and an Git-web viewer are
available on
SourceForge.

Unsorted complementary list

Darwin/Mac OS X

The existing Darwin binaries have been built through buildbot in 2013 and links
to them can be found on the dedicated
page.

OpenSUSE

The OpenSUSE Linux
distribution also has a
large and well-maintained set of packages for cross-compilation.

Rubenvb

Rubenvb has built a number of toolchains including some for less common setups.
They are split into two categories: toolchains targeting
Win32
or
Win64.

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 involves the
mcfgthread library to provide minimum
yet complete C++11 thread support. Disregarding POSIX or Windows XP
compatibility, it implements (hopefully the most) efficient mutexes and
condition variables that are competitive with even native slim reader/write
(SRW) locks and condition variables since Windows Vista.

Store of binaries on SourceForge

A very large number of other binaries and sources are hosted in the File
Release System on Sourceforge which
might have what you are after.

Превью к статье об установке gcc на Windows

Для того, чтобы писать программы на C/C++ обычно достаточно установить какую-нибудь интерактивную среду разработки (IDE), например, Visual Studio или Eclipse, однако иногда (обычно в целях обучения студентов) требуется создавать программы в обыкновенном текстовом редакторе и компилировать приложение, используя консоль и компилятор gcc. В Unix системах он обычно установлен прямо «из коробки», а вот на Windows системах такой роскоши не наблюдается. Более того, у многих пользователей возникает множество проблем при установке компилятора. Поэтому нами было принято решение написать данную статью, чтобы помочь всем тем, кому пришлось или приходится мучаться с установкой этого компилятора на Windows.

Кстати, если вдруг на вашей Unix системе не установлен GCC, то поставить его можно командой sudo apt install gcc, введя свой пароль и согласившись на установку.

0. Прежде чем поставить компилятор GCC

Перед тем как приступить к установке этого компилятора на ваш компьютер, убедитесь в том, что GCC ещё не установлен на нём. Для этого откройте консоль (нажмите Win + R, введите в появившемся окне cmd и нажмите клавишу Enter) и введите следующую команду: gcc --version и нажмите Enter. Если компилятор уже установлен, то выполненная команда выдаст примерно следующую информацию:

gcc (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Если в окне консоли появилось сообщение с версией компилятора и другая информация о GCC (второй скриншот), значит компилятор уже установлен и больше дополнительно ничего делать не нужно. А вот если вывод командной строки такой:

"gcc" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом

— значит GCC ещё не установлен в системе, поэтому двигаемся дальше.

Появившееся окно консоли

Появившееся окно консоли

GCC уже установлен

GCC уже установлен

GCC не установлен

GCC не установлен

1. Скачиваем установщик компилятора

Чтобы поставить GCC на операционную систему Windows, необходимо скачать установочный файл для него. Сделать это можно здесь: equation.com/servlet/equation.cmd?fa=fortran. Найдите в таблице версию компилятора, которая вам больше нравится (мы рекомендуем скачивать самую последнюю, на текущий момент — это версия 8.2.0) и скачайте установщик для вашей системы (32 или 64 бит).

Выбор установочного файла

Выбор установочного файла

2. Установка GCC

После того, как файл был скачан, откройте в проводнике папку, в которую был скачан установщик и запустите его, кликнув по файлу дважды левой кнопкой мыши. Появится окно, требующее подтверждения действия. В нём нужно выбрать да (иначе ничего ставиться не будет).

Установщик начнёт работу и отобразит окно с консолью, а также окно с бежевым фоном, в котором попросит прочесть и принять (или отклонить) лицензионное соглашение. Нажимаем Accept.

Открывшееся окно с установщиком

Открывшееся окно с установщиком

Принимаем лицензионное соглашение

Принимаем лицензионное соглашение

После этого установщик попросит выбрать путь для установки, предложив по умолчанию путь C:mingw. Если вам категорически не нравится этот путь — измените его на более подходящий на ваш взгляд, в противном же случае просто нажмите Install.

Выбор папки для установки

Выбор папки для установки

Теперь остаётся только дождаться окончания распаковки архивов и установки их на компьютер. Как только все файлы будут установлены, инсталятор сообщит об этом, после чего нужно будет нажать на кнопку Finish.

Распаковка файлов и установка

Распаковка файлов и установка

Окончание установки

Окончание установки

3. Проверка установки

По завершении работы установщика перезагрузите компьютер и вновь откройте окно командной строки, введите команду gcc --version и нажмите Enter. На этот раз ответ от этой команды должен будет совпадать со вторым скриншотом из пункта 0. Если это не так, то скорее всего работа установщика была некорректно или преждевременно завершена, так что просто начните установку заново.

GCC установлен

GCC установлен

Поздравляем! Теперь на вашем компьютере установлен компилятор GCC и вы можете писать программы на языках C и C++, а компилировать их через командную строку!

4. Бонус. Компиляция программ с помощью GCC

Теперь, когда у вас установлен компилятор GCC, вы можете создавать программы на C/C++, используя только текстовый редактор и консоль. Для этого создайте новый файл и назовите его как угодно (например, hello_world). Задайте ему расширение .c вместо .txt. Напишите (или скопируйте) текст программы на С в этот файл. Откройте командную строку (Win + R, cmd) и введите следующую команду gcc hello_world.c и нажмите Enter. Если код не содержит ошибок, то результатом команды будет пустота. В противном же случае вы увидите все ошибки, который нашёл компилятор в программе с указанием места этой ошибки. При этом в проводнике появится файл a.out.exe, который будет являться исполняемым файлом для написанной программы. Чтобы запустить его введите в консоли a.out (для Unix-систем нужно писать ./a.out) и нажмите Enter.

Что ещё за a.out? Непонятно!

По умолчанию при компиляции программ GCC в качестве результата создаём исполняемый файл с именем a.out (если такой уже есть, то b.out и т.д.). Это может быть не очень удобно, если у вас в папке лежит сразу много программ, которые нужно скомпилировать и затем запустить. Неудобно хотя бы тем, что разобраться, что такое a.out, а что такое b.out и c.out может быть непросто. Именно поэтому мы рекомендуем компилировать программы с явным указанием имени выходного файла. делается это так: gcc имя_файла.c -o имя_программы.

В результате выполнения такой программы вместо a.out будет создаваться файл с именем, заданным в имя_программы. Например, если для файла hello_world.c мы хотим получить программу hello, то компилировать нужно такой командой: gcc hello_world.c -o hello.

Результат компиляции и запуска программы

Результат компиляции и запуска программы

Используя понятные имена выходных программ (исполняемых файлов), вы гарантируете себе простоту работы и сокращение времени на разбирательство спустя долгое время.

Возможно, также будет интересно: как установить Sublime Text для работы с C/C++.

Фото Перминова Андрея, автора этой статьи

Программист, сооснователь programforyou.ru, в постоянном поиске новых задач и алгоритмов

Языки программирования: Python, C, C++, Pascal, C#, Javascript

Выпускник МГУ им. М.В. Ломоносова

The easiest way to get TDM-GCC is via an installer.

Download a TDM-GCC installer:

tdm-gcc-webdl.exe

Minimal online installer. Select the components you want, and it downloads
and unpacks them. Either edition, latest release only. (GCC
10.3.0)

tdm64-gcc-10.3.0-2.exe

64+32-bit MinGW-w64 edition. Includes GCC C/C++, GNU binutils,
mingw32-make, GDB (64-bit), the MinGW-w64 runtime libraries and tools, and
the windows-default-manifest package.

tdm-gcc-10.3.0.exe

32-bit-only MinGW.org edition. Includes GCC C/C++, GNU binutils,
mingw32-make, GDB (32-bit), the MinGW.org mingwrt and w32api packages, and
the windows-default-manifest package.

The following links are for TDM-GCC releases since the TDM-GCC 9 series. Older
versions are still available on SourceForge:
TDM-GCC files.

TDM Distributed Package Binaries Sources
GCC, TDM32 or TDM64 Github:jmeubank/tdm-gcc-src/releases Github:jmeubank/tdm-gcc-src/tree/tdm-patches.public
GCC, MinGW.org OSDN:mingw/releases/p15691 OSDN:mingw/releases/p15691
GNU binutils (TDM64) Github:jmeubank/tdm-binutils-gdb/releases Github:jmeubank/tdm-binutils-gdb/tree/tdm-patches-binutils.public
GNU binutils (MinGW.org) OSDN:mingw/releases/p15608 OSDN:mingw/releases/p15608
GDB (TDM32, TDM64) Github:jmeubank/tdm-binutils-gdb/releases Github:jmeubank/tdm-binutils-gdb/tree/tdm-patches-gdb.public
GDB (MinGW.org) SourceForge:mingw/files/MinGW/Extension/gdb/ SourceForge:mingw/files/MinGW/Extension/gdb/
MinGW-w64 runtime libraries and tools (TDM64) Github:jmeubank/mingw-w64/releases Github:jmeubank/mingw-w64/tree/tdm-patches
MinGW.org runtime and w32api libraries OSDN:mingw/releases/p15587 OSDN:mingw/releases/p15587
Windows default manifest (TDM32, TDM64) Github:jmeubank/windows-default-manifest/releases Sourceware.org:git/cygwin-apps/windows-default-manifest
mingw32-make SourceForge:mingw/files/MinGW/Extension/make SourceForge:mingw/files/MinGW/Extension/make

Cover image for How to install gcc in Windows 10? (the easier way)

Sudev Suresh Sreedevi

GCC, abbreviation for ‘GNU Compiler Collection’ (thanks @saphirakai
) (and not Gulf Cooperation Council, like I’d assumed) is a necessity if you (or your pesky college) is into C Programming.

Almost all Linux distros come pre-installed with it so they are out of the trouble. But for those of you who were constant users of Windows and Command Prompt, and never felt the necessity for a C compiler, GCC seems to come out of the blue and a tough nut to install. 1000 rage-quits later, I present you this article.

This article is written so that the installation process is made easier than most of the trashy articles I had to go through.

Installation

  1. Go to MinGW official website and click on ‘Downloads’ on the left panel. You’ll be redirected to the site which hosts the files.
    Important Edit: MinGW official website is now down (as of 24th March 2021). Hence, instead of their official website, download from MinGW SourceForge page
  2. Look for mingw-get-setup.exe for downloading. Download it and launch the installer. Accept the terms and move on.
  3. You’ll now see that the installer is connecting to the Internet and downloading a lot of tiny and small files. Wait till it ends.
  4. Right when it ends (which won’t take long), you’ll be presented a window with title MinGW Installation Manager. You should be in the ‘Basic Setup’ tab by default when it launches. If not, click on Basic Setup.
  5. Out of the numerous check boxes presented to you on the right side, tick «mingw32-gcc-g++-bin«. If you are prompted with a menu, click on Mark for Install.
  6. Then on the top left corner click on Installation > Apply Changes. And wait while it downloads a billion files and installs them.

MinGW Installation Manager

  1. Now you gotta edit your «Environment Variables» as well, so that gcc works in cmd no matter the file location.
  2. For that go to Windows Explorer > Right click on This PC > Properties > Advanced system settings > Environment Variables or you could just search for «Environment Variables» in Windows Search…
  3. At the bottom «System Variables» panel, look for a Variable named «Path» and double click on it. Some systems show a good UI for adding a New Path easily (by clicking New), else you just need to add ; at the end and add the following path

    C:MinGWbin
    

    (This is assuming you didn’t manually change any installation paths and went with just clicking ‘Next’ during installation)

  4. Click on OK, and OK and close the other windows. Open a Command Prompt Terminal and try typing gcc --version and press Enter.

    If you get something like

    gcc (MinGW.org GCC Build-2) 9.2.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. 
    There is NO warranty; not even for MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.
    

    gcc has been successfully installed in your PC. Enjoy!

Cheers and happy coding!

In this tutorial, we will learn how to install GCC in Windows 10, Mac, and Linux.

We will use an open-source Integrated Development environment named Code::Blocks which bundles a compiler (named gcc offered by Free Software Foundation GNU), editor and debugger in a neat package.

Step 1) Download Binary release

Go to http://www.codeblocks.org/downloads and click Binary Release.

How to Install GCC on Windows

Step 2) Select the installer with GCC for Windows compiler

Choose the installer with GCC Compiler, e.g., codeblocks-17.12mingw-setup.exe which includes MinGW’s GNU GCC compiler download and GNU GDB debugger with Code::Blocks source files.

How to Install GCC on Windows

Step 3) Start installation

Run the downloaded installer and accept the default options to install GCC Windows file.

How to Install GCC on Windows

Step 4) Accept the terms and conditions

Accept the Agreement

How to Install GCC on Windows

Step 5) Keep default component selection

Keep the component selection default and click Next.

How to Install GCC on Windows

Step 6) Locate the installation path

You may change the installation folder and click Next.

How to Install GCC on Windows

Step 7) Find and double-click on the CodeBlocks icon

To launch Code::Blocks double click on the icon.

How to Install GCC on Windows

Step 8) Let it detect the compiler itself

It will detect the GCC compiler for Windows automatically, set it as default.

How to Install GCC on Windows

Associate C/C++ files with code::blocks

Step 9) Open the IDE and start using

You will see the IDE Home screen.

How to Install GCC on Windows

Install GCC Linux

Linux operating systems mostly comes with GCC preinstalled. To verify if the compiler is installed on the machine, run the following command in the terminal:

gcc --version

After executing this command if the gcc is installed on the machine then it will return the information about the compiler otherwise it will ask you to install the compiler.

To set up the ‘C’ environment on Linux distributions follow the given steps:

1. Open terminal.

2. For red-hat, Fedora users, type and execute this command

# yum groupinstall 'Development Tools'

3. For Debian and Ubuntu users, type and execute following command

$ sudo apt-get update
$ sudo apt-get install build-essential manpages-dev

4. To verify that the GCC has been successfully installed on the machine as we discussed earlier, execute the following command

gcc --version

Install GCC on Mac

To set up a ‘C’ programming environment on MAC operating system, follow the given steps:

1. Visit the given link https://developer.apple.com/downloads/index.action and download. You will need an Apple developer ID

“Command Line Tools for X-Code,” pick any version (latest version is always recommended) and download the .dmg file.

2. After the file is being downloaded on the machine, double click and follow the wizard and install the file. Always keep the default settings as suggested by the installation wizard.

3. After the installation process, open a terminal and run gcc -v command to check if everything is successfully installed.

Conclusion:

‘C‘ program can be written and executed on any machine that has a suitable environment to run the program. Its recommended using an IDE or C compiler for Windows to run C programs. An IDE includes a compiler, editor and debugger. Clanfg, MinGW compiler (Minimalist GNU compiler collection for Windows), Portable ‘C’ compiler, Turbo C are popular compilers available.

In this article we will learn that how to install gcc windows 10. Download and install gcc windows. GCC is compiler for C/C++ language.

This post about how to install gcc ?

Visual Studio Express and the system GCC compiler included in several modern Linux distributions still lack many modern C++ features.

One such function is generic lambdas, also known as polymorphic lambdas.

However, this function is included in the most recent versions of GCC and Clang.

The instructions below will take you through downloading the most current version of GCC on Windows, allowing you to play with generic lambdas and other cutting-edge C++ features.

You’ll have to compile GCC from source, but that shouldn’t be a concern.

These topics we will cover in this article :–[]
  • What is compiler ?
  • What is MinGW and GCC ?
  • Download and install MinGW Compiler on windows .
  • Verify the installation.

Introduction :–[]

What is compiler ?

A compiler is a computer program  that transforms code written in one programming language into code written in another.

The term “compiler” refers to programs that convert source code from a high-level programming language to a lower-level programming language in order to produce an executable program.

  • Compiler is a program that processes a statement written in particular programming language.
  • A computer is not take source code directly. So ,a compiler takes our written code and covert into Machine code that a computer’s system process.
  • Example : MinGW GCC Compiler for C/C++ , Java JDK for Java.
  • There are three types of compilers :- 1.Single Pass Compiler , 2. Two Pass Complier and 3. Multi pass Compiler

What is MinGW and GCC ?[]

MinGW (formerly mingw32) is a free and open source software development environment for creating Microsoft Windows applications. With the launch of the Mingw-w64 project in 2005–2008, the progress of the MinGW project was split in two.

MinGW provides a Windows native build of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a series of freely distributable Windows related header files and static import libraries that allow the use of the Windows API, and miscellaneous utilities.

MinGW does not depend on a third-party dynamic-link library (DL) for C runtime.

Since the runtime libraries are not distributed under the GNU General Public License (GPL).

It is not mandatory to share the source code for the program generated, unless a GPL library is included elsewhere in the software.

MinGW can run natively on Microsoft Windows, cross-hosted on Linux (or other Unix), or “cross-natively” on Cygwin.

Despite the fact that MinGW program are 32-bit executables, they can be found in both 32-bit and 64-bit models of Windows.

  • MinGW stands for Minimal GNU for Windows.
  • MinGW contains GCC which in the collection of GNU free Software.
  • It is a GCC-based compiler that compiles and connects windows code.
  • Uses the Microsoft runtime libraries.
  • distributed with the Windows operating system.
  • GCC stands for GNU Compiler Collections.
  • Used to compile C and C++ language.
  • GCC can compile any .C or .CPP files but they’ll be considered C and C++, respectively.
  • Any .C or .CPP files can be compiled with g++ , but they will only be handled as C++ files.

Download and install MinGW/gcc Compiler on windows ?[]

MinGW-w64 is a fork of MinGW that is designed to run on 64-bit Windows (as well as the 32-bit windows). http://mingw-w64.org/doku.php is the mother port.

GNU is a source of open source programming software, and MinGW stands for Minimalist GNU for Windows (GNU stands for GNU is Not Unix).

In this handout, you’ll get the files you’ll need for GNU C++, and in the next, you’ll get a version of Eclipse that’s already configured to work with MinGW.

Before you started, you might want to print these instructions so that you can refer to them when downloading and installing MinGW.

Alternatively, you should simply bookmark this page in your browser. Until executing the action mentioned in – step, make sure you read it absolutely.

Download MinGW :–[]

  • To Download MinGW Click here. Following Screen appear after open this link in new tab.
  • Click on ‘mingw-get-setup.exe(86.5 kb)’ . This is MinGW installer setup.
  • Following Screen appear . The file will starting automatically download in standard download folder. It will download quickly.
  • Go into your downloads folder and run the .exe file.
  • popup appear on screen. Click on yes.
  • Following window appear on screen.
  • Click on Install.
  • Install on default directory or change if you want to change. Click Continue.
  • Download is in process. MinGW is downloading required filles.
  • Click Continue download is completed.
  • Following window will appear after download is complete . check on mingw32-base , mingw32-gcc-g++ and msys-base.
  • After click on checkbox click on installation and click on Apply.
  • Following window will appear. Download is started. This is final installation.
  • Than close the window and go in the installation directory C:MinGW .
  • Go into bin folder. click on address bar and copy the path C:MinGWbin.
  • Go to System properties.
  • Than go to Advanced system settings.
  • Click on Environment variables to go into path setttings.
  • Press click on Path and than click on Edit to add GCC to path.
  • Click on New to create new path .
  • Paste the path copied you and click ok. Now everything is ok. MinGW is successfully installed and added to path. Now you verify that MinGW is working or not.

Verify the installation :–[]

Now everything is ok. Now verify that the MinGW was successfully install on your computer.

  • Open cmd and type command gcc. The following window will appear after this command.
  • You should get output : gcc: no input files. it means that the gcc successfully installed in your computer. If you get other output try again this process and verify again.
  • Download any code editor or IDE and lets start coding.

Thank you for visiting our website and reading this blog post. We hope that this post was very helpful for you. If you think this post was helpful for you , please share it.

Give us your feedback in comments. Continue visit our website to get daily more helpful posts. Thank you again.

For more helpful posts and updates please keep visiting our website.

Read more

more posts

Понравилась статья? Поделить с друзьями:
  • Скачать компилятор c для windows xp 32 bit
  • Скачать кодеки для windows 10 64 bit с официального сайта
  • Скачать компас м16 для windows 10
  • Скачать кодеки shark для windows 10 64 bit
  • Скачать компас 3д для windows xp 32 бит