Joe
Joe

Reputation: 551

Build gcc on Windows with another gcc version

How to compile the newest gcc release under Windows 10? I have the latest mingw-w64available here which isn't fully c++17 compliant (I cannot use the filesystem library). A build called winlibs is also available but it is built on mingw-w64 8.0.0, so newer standards aren't fully supported. I downloaded the compressed file gcc-10.3.0.tar.gz. What are the steps needed to do build any new (or old) gcc release on Windows natively without resorting to cygwin or msys or wsl?

Upvotes: 1

Views: 422

Answers (2)

Brecht Sanders
Brecht Sanders

Reputation: 7315

Building GCC isn't trivial. It involves multiple steps, starting with having all the dependancies available.

You already had an older winlibs release, who don't you just get the latest winlibs build from http://winlibs.com/ ?

Upvotes: 1

ravenspoint
ravenspoint

Reputation: 20616

I do not understand what problem you are having with std::filesystem. Perhaps you are using a different mingw. Here is how I get mingw64

Download and install the latest g++ 64 bit compiler from http://www.msys2.org/ Follow installation instructions on that page. Note that you will have to stop and restart the MSYS2 command line tool several times. To do this, close the window and then run C:\msys64\msys2_shell. When pacman ( packet manager ) reports "there is nothing to do" run it once more with the command pacman -S mingw-w64-x86_64-toolchain

Upvotes: 0

Related Questions