How to update GCC in MinGW on Windows?

I used to manually install GCC from source on Ubuntu, and it was a painful process. Therefore, I really do not want to repeat this process. I currently have MinGW and GCC (4.6.2) installed on my machine. So, is there an easy way to upgrade GCC without creating it completely from the source code? Has anyone done this before sharing their tips?

+44
c ++ gcc c ++ 11 mingw
Mar 26 2018-12-12T00: 00Z
source share
4 answers

MinGW build snapshots and releases http://code.google.com/p/mingw-builds/downloads/list

+18
Mar 26 '12 at 1:20
source share
  • Run shell (cmd or sh)
  • Refresh package list (Internet connection required):

    mingw-get update

  • After this update

    mingw-get upgrade

After that, your mingw packages should be updated to the latest versions.

There is also a GUI version called MinGW Installation Manager and is typically located in

 C:\MinGW\libexec\mingw-get\guimain.exe 
+50
May 22 '14 at 10:55
source share

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




I don't know if you can upgrade GCC to MinGW, but there are alternative MinGW projects with newer versions of GCC.

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

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

 g++ (Built by MinGW-builds project) 4.7.2 

The latest GCC, which comes standard with MinGW, is currently 4.7.0. I put together some simple projects in Code :: Blocks and the latest source of wxWidgets, and everything seems to work.

It's worth noting that MinGW-builds includes a version of GDB with Python script support if you need printer support with STL support or other Python GDB 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. This is a standalone package. As far as I can tell, Python scripts are not supported in the GDB that comes with this package.

Finally, there is the MinGW-w64 project , which is the MinGW plug. Rubenvb, which posted the answer to this question, has good standalone packages (in the personal assemblies folder) based on this project, which includes the updated GCC (4.7.2). The included GDB seems to have included a Python script.

+11
Oct 21
source share

I built a more modern GCC 4.7 (it is built into the freeze code, so it should be equivalent to release). In addition, this assembly contains <thread> 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 to your PATH.

PS: It has its own Windows compiler and Windows Clang build. I suggest using Clang with only one of my GCC 4.6 collections, since it has problems with GCC 4.7 libstd ++. Extract the Clang package to the same directory as the GCC package, and it will work out of the box.

+4
Mar 26 2018-12-12T00:
source share



All Articles