How to update gcc windows

How to update GCC in MinGW on Windows?

Posted by: admin November 22, 2017 Leave a comment

I’m used to manually install GCC from source before on Ubuntu and it was a painful process. So I really don’t want to do repeat this process. Currently, I have MinGW and GCC (4.6.2) installed on my machine. So is there an easy way to update GCC without building it entirely from source? Has anyone done it before can share me some tips?

Update package list (need Internet connection):

After this run upgrade

After this your mingw packages should be upgraded to latest versions.

There is also GUI version called MinGW Installation Manager and located typicaly at

UPDATE: As of Nov-5-2012, MinGW includes 4.7.2 of the GCC compiler, which is the most current version. I personally will use the MinGW package, since it includes MSYS and other tools, and since it is the defacto standard, I hope that it is better supported. The only drawback is the included GDB does not include Python scripting, but I think that can be updated separately.

I don’t know if you can update the GCC in MinGW, but there are alternative projects to MinGW with newer versions of GCC.

The MinGW-builds project provides a package similar to MinGW but with an updated GCC (4.7.2). I extracted the files to c:\MinGW (so I could use the same path) after moving my existing MinGW to another folder. Only MinGW has MSYS, so if you need that (I did) copy the msys folder from the original MinGW.

Читайте также:  Установка ipa через mac os

After installing MinGW-builds, the result of g++ –version:

The latest GCC that comes with standard MinGW is currently 4.7.0. I compiled a few simple projects in Code::Blocks, and the latest wxWidgets source, and everything seems to work.

It’s worth noting that MinGW-builds includes a Python script enabled version of GDB, in case you want STL pretty printer support, or other GDB Python features.

Another good choice is TDM-GCC, which is a project that hosts an impressive installer that includes an updated GCC compiler (4.7.1) and support tools. It is a standalone package. As far as I can tell, Python scripting is not supported in the GDB that comes with this package.

Finally there is the MinGW-w64 project, which is a fork of MinGW. Rubenvb, who posted an answer to this question, has good standalone packages (in the personal builds folder) based on this project which include an updated GCC (4.7.2). The included GDB seems to be Python script enabled.

I have built a more up to date GCC 4.7 (it’s built within code freeze, so it should be equivalent with the release). Also, this build contains support.

The -gcc_linux package is what you want if you want to use it on Linux. Just extract somewhere and add the mingw??/bin directory to PATH.

PS: There’s a native Windows compiler and a Windows Clang build. I suggest using Clang only with one of my GCC 4.6 builds, as it has trouble with GCC 4.7’s libstd++. Extract the Clang package in the same directory as the GCC package and it will work out of the box.

emplace_back() does not behave as expected

Questions: I wrote a simple program to play around with in-place creation of objects inside standard library containers. This is what I wrote: #include #include class A.

Читайте также:  Boot0 error windows 10 как исправить

Does in class member initialization takes place at compile time or run-time?

Questions: In C++11 a new feature was introduced where the programmer can initialize class member variables inside class’s definition, see code below: struct foo < int size = 3; int int .

Why are move semantics for a class containing a std::stringstream causing compiler errors?

Questions: How can I make this simple class movable? What I thought was correct just produces a wall of errors… #include #include #include class .

How to update GCC in MinGW on Windows?

I’m used to manually install GCC from source before on Ubuntu and it was a painful process. So I really don’t want to do repeat this process. Currently, I have MinGW and GCC (4.6.2) installed on my machine. So is there an easy way to update GCC without building it entirely from source? Has anyone done it before can share me some tips?

7 Answers 7

Update using terminal:

Run the command prompt/terminal ( cmd or sh ).

Update the package list:

After updating the package list, run:

When the command finishes running, all of your packages will be upgraded.

Update using the GUI version:

If you aren’t used to the terminal, there is also a GUI version of MinGW called «MinGW Installation Manager», which is normally located at:

When the GUI is open, tap Installation -> Update Catalogue . This will update the package list.

After that, tap Installation -> Mark All Upgrades . This will select all of the packages which can be upgraded.

Finally, tap Installation -> Apply Changes to apply the upgrades.

UPDATE: As of Nov-5-2012, MinGW includes 4.7.2 of the GCC compiler, which is the most current version. I personally will use the MinGW package, since it includes MSYS and other tools, and since it is the defacto standard, I hope that it is better supported. The only drawback is the included GDB does not include Python scripting, but I think that can be updated separately.

Читайте также:  Версия linux с кодеками

I don’t know if you can update the GCC in MinGW, but there are alternative projects to MinGW with newer versions of GCC.

The MinGW-builds project provides a package similar to MinGW but with an updated GCC (4.7.2). I extracted the files to c:\MinGW (so I could use the same path) after moving my existing MinGW to another folder. Only MinGW has MSYS, so if you need that (I did) copy the msys folder from the original MinGW.

After installing MinGW-builds, the result of g++ —version:

The latest GCC that comes with standard MinGW is currently 4.7.0. I compiled a few simple projects in Code::Blocks, and the latest wxWidgets source, and everything seems to work.

It’s worth noting that MinGW-builds includes a Python script enabled version of GDB, in case you want STL pretty printer support, or other GDB Python features.

Another good choice is TDM-GCC, which is a project that hosts an impressive installer that includes an updated GCC compiler (4.7.1) and support tools. It is a standalone package. As far as I can tell, Python scripting is not supported in the GDB that comes with this package.

Finally there is the MinGW-w64 project, which is a fork of MinGW. Rubenvb, who posted an answer to this question, has good standalone packages (in the personal builds folder) based on this project which include an updated GCC (4.7.2). The included GDB seems to be Python script enabled.

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