How to update GCC in MinGW on Windows?

Chan picture Chan · Mar 26, 2012 · Viewed 77.3k times · Source

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?

Answer

Yuriy Petrovskiy picture Yuriy Petrovskiy · May 22, 2014

Update using terminal:

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

  2. Update the package list:

    mingw-get update
    
  3. After updating the package list, run:

    mingw-get upgrade
    

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:

C:\MinGW\libexec\mingw-get\guimain.exe
  1. When the GUI is open, tap Installation -> Update Catalogue. This will update the package list.

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

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