🌐
GNU
gcc.gnu.org
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, and Algol 68 as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
Installing GCC
The latest version of this document is always available at https://gcc.gnu.org/install/. It refers to the current development sources, instructions for specific released versions are included with the sources Β· This document describes the generic installation procedure for GCC as well as detailing ...
GCC mirror sites
Our releases are available on the GNU download server and its mirrors Β· In addition the following sites mirror gcc.gnu.org (Phoenix, Arizona, USA) directly, and should also carry our snapshots:
GCC Releases
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.
Downloading GCC
The source distribution includes the Ada, C, C++, Objective-C, COBOL (GCC 15 and later), D (GCC 9 and later), Fortran, Go, Modula-2 (GCC 13 and later) and Algol 68 (GCC 16 and later, experimental) compilers, as well as runtime libraries for C++, Objective-C, COBOL, Fortran and Algol 68.
optimizing compiler produced by the GNU Project, key component of the GNU tool-chain and standard compiler for most projects related to GNU and the Linux kernel.
GCC_10.2_GNU_Compiler_Collection_self-compilation.png
gcc 11 1 0 compiling chicken screenshot
The GNU Compiler Collection (GCC) (formerly GNU C Compiler) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation … Wikipedia
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 38 years ago (1987-03-22)
Factsheet
Original author Richard Stallman
Developer GNU Project
Initial release March 22, 1987; 38 years ago (1987-03-22)
🌐
Wikipedia
en.wikipedia.org β€Ί wiki β€Ί GNU_Compiler_Collection
GNU Compiler Collection - Wikipedia
3 weeks ago - The GNU Compiler Collection (GCC) (formerly GNU C Compiler) is a collection of compilers from the GNU Project that support various programming languages, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes GCC as free software under the GNU General ...
Discussions

Where to download GNU C++ compiler - Stack Overflow
Learn more about Collectives ... Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Can anyone suggest me where to download a GNU c++ compiler, which I can use in Ubuntu and also on Windows with Netbeans IDE, and also GNU tools. More on stackoverflow.com
🌐 stackoverflow.com
c++ - What is the difference between g++ and gcc? - Stack Overflow
Learn more about Collectives ... Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... What is the difference between g++ and gcc? Which one of them should be used for general c++ development? ... Brian R. Bondy Β· 350k129129 gold badges607607 silver badges641641 bronze badges 0 ... gcc and g++ are compiler-drivers of the GNU ... More on stackoverflow.com
🌐 stackoverflow.com
How can I setup the GNU/GCC compiler in the Windows environment?
Your main options could be, exploring cygwin, using the WSL, or using a virtual machine. Ive never heard of code blocks so I cant comment More on reddit.com
🌐 r/cpp_questions
18
3
October 3, 2019
GCC (GNU Compiler Collection): resources on potential improvements or new features?
You might could also try r/C_Programming and r/cpp or maybe even subs like r/linux -- they're all more likely than here to have some inputs. I also forgot: I'm pretty sure the GCC Golang backend could use some work... More on reddit.com
🌐 r/learnprogramming
4
1
October 27, 2022
🌐
Reddit
reddit.com β€Ί r/c_programming β€Ί gcc, the gnu compiler collection 15.1 released
r/C_Programming on Reddit: GCC, the GNU Compiler Collection 15.1 released
April 25, 2025 -

https://gcc.gnu.org/gcc-15/

Some discussion on hackernews: https://news.ycombinator.com/item?id=43792248

Awhile back, there was some discussion of code like this:

char a[3] = "123";

which results in a an array of 3 chars with no terminating NUL byte, and no warning from the compiler about this (was not able to find that discussion or I would have linked it). This new version of gcc does have a warning for that. https://gcc.gnu.org/pipermail/gcc-patches/2024-June/656014.html And that warning and attempts to fix code triggering it have caused a little bit of drama on the linux kernel mailing list: https://news.ycombinator.com/item?id=43790855

🌐
SourceForge
sourceforge.net β€Ί projects β€Ί gcc-win64
gcc-win64 download | SourceForge.net
Download gcc-win64 for free. x64 build of GCC for Windows. x64 C/C++ compiler for Windows using (unofficial build): - gmp - mpfr - mpc - isl - cloog - mingw-w64 - gcc - seh You need at least core2 command set support to run this application. Note that every version with bundled gdb needs at ...
🌐
GNU
gnu.org β€Ί software β€Ί gcc
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, and COBOL as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, ...
Find elsewhere
🌐
Phoronix
phoronix.com β€Ί news β€Ί GCC-Exciting-2025
GCC & The GNU Toolchain's Exciting 2025 With New Languages, More Optimizations - Phoronix
December 31, 2025 - A third round was merged on Friday adding yet more gccrs features. GCC 15.1 Released With COBOL Compiler & Many Other Improvements GCC 15.1 was just released as the newest annual feature release to the GNU Compiler Collection.
🌐
Incredibuild
incredibuild.com β€Ί home β€Ί integrations β€Ί gcc
What is GNU Compiler Collection (GCC) | Incredibuild
September 17, 2024 - The GNU Compiler Collection, commonly known as GCC, is a set of compilers and development tools available for Linux, Windows, various BSDs, and a wide assortment of other operating systems.
🌐
Tamu
hprc.tamu.edu β€Ί kb β€Ί Software β€Ί GNU-Compiler-Collection
GNU Compiler Collection (GCC) - Texas A&M HPRC
The GNU Compiler Collection (GCC) is an optimizing compiler produced by the GNU Project. GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and the Linux kernel.
Top answer
1 of 11
979

gcc and g++ are compiler-drivers of the GNU Compiler Collection (which was once upon a time just the GNU C Compiler).

Even though they automatically determine which backends (cc1 cc1plus ...) to call depending on the file-type, unless overridden with -x language, they have some differences.

The probably most important difference in their defaults is which libraries they link against automatically.

According to GCC's online documentation link options and how g++ is invoked, g++ is roughly equivalent to gcc -xc++ -lstdc++ -shared-libgcc (the 1st is a compiler option, the 2nd two are linker options). This can be checked by running both with the -v option (it displays the backend toolchain commands being run).

By default (and unlike gcc), g++ also adds linker option -lm -- to link against libm which contains implementations for math.h.

2 of 11
592

GCC: GNU Compiler Collection

  • Referrers to all the different languages that are supported by the GNU compiler.

gcc: GNU C      Compiler
g++: GNU C++ Compiler

The main differences:

  1. gcc will compile: *.c\*.cpp files as C and C++ respectively.
  2. g++ will compile: *.c\*.cpp files but they will all be treated as C++ files.
  3. Also if you use g++ to link the object files it automatically links in the std C++ libraries (gcc does not do this).
  4. gcc compiling C files has fewer predefined macros.
  5. gcc compiling *.cpp and g++ compiling *.c\*.cpp files has a few extra macros.

Extra Macros when compiling *.cpp files:

#define __GXX_WEAK__ 1
#define __cplusplus 1
#define __DEPRECATED 1
#define __GNUG__ 4
#define __EXCEPTIONS 1
#define __private_extern__ extern
🌐
Quora
quora.com β€Ί What-is-the-history-of-the-GNU-Compiler-Collection-GCC-What-problem-did-it-solve-that-other-compilers-couldnt-solve-Why-isnt-it-used-more-widely-than-it-currently-is
What is the history of the GNU Compiler Collection (GCC)? What problem did it solve that other compilers couldn't solve? Why isn't it used more widely than it currently is? - Quora
Answer: The story is told (I think I am correct, this is not personal experience) that people at MIT used the emacs editor on ITS, and ported emacs ( written in LISP) to Multics when Multics replaced ITS. They also wanted to use emacs on Unix, but there was no LISP compiler or interpreter for Uni...
🌐
Unraveldata
docs.unraveldata.com β€Ί unravel-v476x β€Ί en β€Ί install-gcc-compiler.html
Installing GNU Compiler Collection (GCC)
There are different versions of Developer Toolset collections available. The minimum requirement is devtoolset-8. [unravel@host ~]$ sudo yum install -y devtoolset-8 ... [unravel@host ~]$ scl enable devtoolset-8 bash # C compiler [unravel@host ~]$ gcc --version # C++ compiler [unravel@host ~]$ g++ --version
🌐
Reddit
reddit.com β€Ί r/cpp_questions β€Ί how can i setup the gnu/gcc compiler in the windows environment?
r/cpp_questions on Reddit: How can I setup the GNU/GCC compiler in the Windows environment?
October 3, 2019 -

I apologize for the long post in advanced-- I'm just trying to describe what I've already tried as best as possible in order to better troubleshoot the issue.

I am in an introductory C++ class and we have been using the school computers with all the environments already pre-configured for us. The teacher told us that we can simply download CodeBlocks or XCode for Win/macOS and use the GNU/GCC compiler without any problems. He also stated multiple times that for our curriculum, we would require this compiler specifically instead of something like MSVC, since it better follows traditional C++ standards and allows teachers and students to build any source code on multiple machines.

I installed Codeblocks a little while ago and I'm trying to get my source code running on my home computer now. To my surprise, Codeblocks could not automatically find the compiler on my system after following the default installation (full features). When doing a custom Windows Explorer search for the compiler executable on my entire hard drive, it could not find any trace of the file located on my computer either. Our teacher said that this compiler should be included in the Codeblocks installation, but it looks to me as though didn't install it whatsoever. I also checked to ensure I was downloading the latest version, re-ran the installation as admin, but there was still no trace of the compiler anywhere to be found.

After doing some investigating online, I learned that the GNU compiler is actually not a Windows compiler at all but was mainly developed for Unix based systems first. The compiler that Codeblocks expects is actually "mingw" which is apparently a port of the free GCC compiler from these other platforms.

I found the "mingw installation manager" binary package online, installed it on my system, then proceeded to download and install all the packages under the mingw repositories 'basic setup'. After applying the changes, it installed mingw to a root folder on my C:\\ drive where Codeblocks first expected it, which then allowed me to build/run the basic example script "Hello World" within the IDE. All seemed well now, except there were still some other problems happening...

While trying to build my script I'd previously been working on, one of the namespaces from the <thread> library threw a compiler error. This error did not show up while working on the school's computers, which leads me to believe that I might be missing some additional packages of some sort. If this is the case, then this is going to cause a lot of trouble down the road when trying to build source code that could be using correct syntax but missing some other resource.

To ensure that I am not just crazy, please see this small snip-it to verify the source code:

#include <iostream>
#include <thread>
#include <string>
#include <chrono>

using namespace std;
using namespace std::chrono;
using namespace std::this_thread;

// error: compiler complains that "this_thread" is not a namespace-name

In my global compiler settings within Codeblocks, I have also checked the following box:

Have g++ follow the C++14 ISO C++ language standard [-std=c++14]

Why is the compiler not finding the std::this_thread; namespace? Am I missing a resource? How can I setup up my computer with everything I need using the mingw GNU/GCC compiler?

PS: I am trying to use std::this_thread::sleep_for() from the <thread> library in order pause the program and allow the user to see a displayed message before it is cleared from the standard output in the console.

🌐
Visual Studio Code
code.visualstudio.com β€Ί docs β€Ί cpp β€Ί config-mingw
Using GCC with MinGW
November 3, 2021 - Get the latest version of MinGW-w64 via MSYS2, which provides up-to-date native builds of GCC, MinGW-w64, and other helpful C++ tools and libraries. This will provide you with the necessary tools to compile your code, debug it, and configure ...
🌐
apponic
gnu-compiler-collection.apponic.com
GNU Compiler Collection Free Download
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D and Modula-2 as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
Rating: 5 ​ - ​ 2 votes
🌐
Free Software Directory
directory.fsf.org β€Ί wiki β€Ί Gcc
Gcc - Free Software Directory
November 23, 2023 - GCC is the GNU Compiler Collection. It provides compiler front-ends for several languages, including C, C++, Objective-C, Fortran, Ada, and Go.
🌐
ArchWiki
wiki.archlinux.org β€Ί title β€Ί GNU_Compiler_Collection
GNU Compiler Collection - ArchWiki
January 7, 2026 - The GNU Compiler Collection (GCC) is part of the GNU toolchain and includes front ends for C and C++.