Версия gcc для linux

Downloading GCC

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).

Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

These pages are maintained by the GCC team. Last modified 2021-07-28 .

Источник

Как установить компилятор GCC в Ubuntu 18.04

How to Install GCC Compiler on Ubuntu 18.04

В этом руководстве описаны шаги, необходимые для установки компилятора GCC в Ubuntu 18.04. Мы покажем вам, как установить стабильную версию дистрибутива и последнюю версию GCC.

Коллекция компиляторов GNU (GCC) — это набор компиляторов и библиотек для языков программирования C, C ++, Objective-C, Fortran, Ada, Go и D. Многие проекты с открытым исходным кодом, включая инструменты GNU и ядро ​​Linux, скомпилированы с помощью GCC.

Те же инструкции применимы для Ubuntu 16.04 и любого дистрибутива на основе Ubuntu, включая Kubuntu, Linux Mint и Elementary OS.

Прежде чем вы приступите

Чтобы добавлять новые репозитории и устанавливать пакеты в вашей системе Ubuntu, вы должны войти в систему как пользователь root или пользователь с привилегиями sudo .

Установка GCC на Ubuntu

Репозитории Ubuntu по умолчанию содержат метапакет с именем, build-essential который содержит компилятор GCC и множество библиотек и других утилит, необходимых для компиляции программного обеспечения.

Читайте также:  Динамические обои для mac os big sur как установить

Выполните следующие шаги, чтобы установить компилятор GCC Ubuntu 18.04:

Начните с обновления списка пакетов:

Установите build-essential пакет, набрав:

Команда устанавливает кучу новых пакетов , включая gcc , g++ и make .

Вы также можете установить справочные страницы об использовании GNU / Linux для разработки:

Чтобы убедиться, что компилятор GCC успешно установлен, используйте gcc —version команду, которая выводит версию GCC:

Версия GCC по умолчанию, доступная в репозиториях Ubuntu 18.04 7.4.0 :

Вот и все. GCC теперь установлен в вашей системе, и вы можете начать его использовать.

Компиляция примера Hello World

Скомпилировать базовую программу на C или C ++ с помощью GCC довольно просто. Откройте текстовый редактор и создайте следующий файл:

Сохраните файл и скомпилируйте его в исполняемый файл с помощью следующей команды:

Это создаст двоичный файл с именем hello в том же каталоге, где вы запускаете команду.

Запустите hello программу с помощью:

Программа должна напечатать:

Установка нескольких версий GCC

В этом разделе приведены инструкции по установке и использованию нескольких версий GCC в Ubuntu 18.04. Новые версии компилятора GCC включают поддержку новых языков, лучшую производительность и расширенные функции.

На момент написания этой статьи репозитории Ubuntu по умолчанию включают несколько версий GCC, от 5.x.x до 8.x.x . Последняя версия GCC, 9.1.0 доступная в PPA Ubuntu Toolchain.

В следующем примере мы установим последние три версии GCC и G ++.

Сначала добавьте ubuntu-toolchain-r/test PPA в вашу систему с помощью:

Установите нужные версии GCC и G ++, набрав:

Приведенные ниже команды настраивают альтернативу для каждой версии и связывают с ней приоритет. Версия по умолчанию — это версия с наивысшим приоритетом, в нашем случае это так gcc-9 .

Позже, если вы захотите изменить версию по умолчанию, используйте update-alternatives команду:

Вам будет представлен список всех установленных версий GCC в вашей системе Ubuntu. Введите номер версии, которую вы хотите использовать по умолчанию, и нажмите Enter .

Команда создаст символические ссылки на определенные версии GCC и G ++.

Вывод

Вы успешно установили GCC на свой Ubuntu 18.04. Теперь вы можете посетить официальную страницу документации GCC и узнать, как использовать GCC и G ++ для компиляции программ на C и C ++

Источник

GCC Releases

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 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
Читайте также:  Windows сообщает что устройство iocbios работает некорректно

Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

These pages are maintained by the GCC team. Last modified 2021-09-29 .

Источник

Оцените статью