Update using terminal:
Run the command prompt/terminal (
cmdorsh).Update the package list:
mingw-get updateAfter 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
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 Changesto apply the upgrades.
Update using terminal:
Run the command prompt/terminal (
cmdorsh).Update the package list:
mingw-get updateAfter 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
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 Changesto apply the upgrades.
Snapshots and release builds of the MinGW http://code.google.com/p/mingw-builds/downloads/list
Hello, I installed the compilers about a month ago with MingGW, little did I know they were out of date, around version 6. I can't find a good tutorial on how to update them on windows so if someone could help me out that would be great.
Videos
You can install GCC 6 by adding the ubuntu-toolchain-r/test PPA. To do so, run the following commands:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-6
You can verify that gcc-6 is installed by running gcc-6 --version and the output should say gcc-6 (Ubuntu 6.1.1-2ubuntu12~16.04) 6.1.1 20160510.
As suggested by Mohamed Slama, if you want to further change the default GCC and G++ to the latest versions, install g++-6 with
sudo apt install g++-6
and then run
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
If you want to build it from source (which I recommend as you can for example make a cross-compiler, etc.) download the source from a mirror.
Then extract it with:
tar -xvf gcc-6.1.0.tar.gz
After that change directory to there:
cd gcc-6.1.0
Then create build directory and cd to it:
mkdir build
cd build
Then configure the makefile (--disable-multilib means to not build libraries for cross-compilation):
../configure --enable-languages=c,c++ --disable-multilib
If you ran into errors due to missing required libraries or other prerequisites: (Credits to this)
./contrib/download_prerequisites
And then build it:
make -j 8
This process may take some time and after done invoke this:
sudo make install
That's it!