5

I need a compiler that supports c++20, like GCC 10.1 (used on linux), but to use it in my Windows 10.

I saw posts that recommend Mingw-w64, but does it supports c++20?

4
  • 1
    Windows 10 can now run Linux in a container. Just run Linux. It's the simplest answer. Why struggle trying to cram a complex piece of software into some alien operating system that it was not designed for? Commented May 15, 2020 at 3:51
  • Could you explain me or give a link on how to "run Linux in a container" plz Commented May 15, 2020 at 3:54
  • 1
    Searching for "linux container in windows 10" on www.google.com let me straight to Microsoft's documentaiton for doing so. Commented May 15, 2020 at 4:02
  • There's a table of C++ feature support by version in the following link. Seems MSVC has rather complete support, and is available for free. en.cppreference.com/w/cpp/compiler_support, Commented Mar 8, 2022 at 19:31

2 Answers 2

7

In the meantime GCC 10 has been released and MinGW builds are available.

You can download a standalone build of MinGW-w64 with GCC 10 for Windows 32-bit and 64-bit from http://winlibs.com/

Sign up to request clarification or add additional context in comments.

1 Comment

2

You can install Clang and MSVC/Visual Studio on Windows directly. For gcc you need MinGw /Msys2. I use wsl. With wsl you can check out gcc trunk and build it yourself.

C++20 is not completely supported but you can use most of it like coroutines, concepts...

Other compilers usually lack behind those.

1 Comment

Btw: here you can find a good tutorial how to compile GCC on your own here: solarianprogrammer.com/2016/10/07/building-gcc-ubuntu-linux Just download the current source and adjust the config-command. The GCC source is available here: github.com/gcc-mirror/gcc/archive/master.zip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.