How can I install a specific version of GCC on Windows?

I searched on Google and Bing for GCC version 9.3.0 for Windows, but they only give me GCC 9.2.0 instead.

However, for Linux the version is so complete that you cannot find any missing version.

Therefore, can I install a specific version of GCC for Windows?

This post may help millions of programmers on Windows.

Thanks!
Why do you want gcc 9.3? The current version is 11.2

There is cygwin 11.2 and LLVM-MinGW and MSYS2 here:
https://www.mingw-w64.org/downloads/

I am a Linux guy, I prefer to do stuff natively (as opposed to some port to get it to run on Windows), so much less hassle. On my system gcc/g++ and clang/clang++ are part of the distribution, they are updated automatically along with all the other apps. I also have the ability to build the absolute latest (including overnight builds) at any time. For example clang++ 14.0 (not released yet) has reflection, I could build that.

One could consider having the Linux subsystem on windows.
@TheIdeasMan

I am not a developer.

I am attending an OI(Olympiad in Informatics), they compile source files only under GCC 9.3.0, and I work on windows, so I want to find this strange kind of compiler.
FWIW, you can get GCC (MinGW-w64) for Windows via the "winlibs" project:++
https://winlibs.com/

...or via "TDM-GCC" project:
https://jmeubank.github.io/tdm-gcc/

If you really need specific version 9.3.0, it is archived here:
https://github.com/brechtsanders/winlibs_mingw/releases/tag/9.3.0-7.0.0-r2

But, as TheIdeasMan said before, you probably should grab the latest GCC stable version!

BTW: GCC (MinGW-w64) is not "strange" at all. It's probably the most widely used C/C++ compiler in existence (besides MSVC and Clang). It is a bit strange to require a specific old version though...
Last edited on
I am attending an OI(Olympiad in Informatics), they compile source files only under GCC 9.3.0

Just because they use an older compiler doesn't mean you have to. All that matters is the code written can't have any C++ features from a C++ standard that GCC 9.3.0 doesn't support.
Topic archived. No new replies allowed.