How to use Winlib in VS Code [duplicate] - c++

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?

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/

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.

Related

Compile for c++14 on CentOS 6

I have a C++ program that uses various C++14 features, and have been asked to compile it for a CentOS 6 system. GCC doesn't support C++14 features on CentOS 6 as far as I can tell (and based on compiler errors).
Is it possible to compile for C++14 on CentOS 6?
Assuming someone has created a whole compatibility layer for compiling C++14 on CentOS6, could I even distribute that executable? Or would the target machine ALSO have to install a compatibility layer?
I recall reading (years ago) about how to use different development toolchains at once, including I think those later than what was supported by the repos for the OS. Just can't recall details.
No, it is not possible to compile C++14 on CentOS 6. Only some C++11 features are available on CentOS 6.
CentOS runs GCC 4.4.7 where-in C++14 features start to become available with GCC 4.9 and higher.
The Boost libraries may be used to replicate some modern C++ features if on an outdated GCC version.

Which Version of Code::Blocks supports C++11, C++14 and C++17 Compilers?

Please give me the Version of Code::blocks, currently i'm using Code::Blocks 10.05 on Windows 7 with Server Pack 1 installed. The Code::blocks i'm using does not support either of the three Compilers that i had mentioned above, Thank You.
[I'm not going to install VS, because of data limit, i atleast need C++11, so even if you Coders can give me that version of Code::blocks it would be more than enough]
Definitely the latest version (20.03) which supports C++11, C++14, C++17 and even C++20, if the compiler allows it. If you always want a compiler updated to the latest standards (and upgradeable with a simple command from the shell), the advice is to install the compiler separately through the Msys2 toolchain.
Code::Blocks can't compile your code. You need a newer version of the compiler, such as GCC or Clang.
For more information refer to: How to Enable C++17 Support in Code Blocks.

MinGW: How to upgrade GCC/G++ to version 5 on Windows?

I have MinGW installed on my computer and I just found out that my GCC/G++ has problems compiling newer C++ standards. So I want to upgrade from 4.8.1-4 to the latest version (5.3 at the time of writing this).
The MinGW Installation Manager doesn't install a newer version than 4.8.1-4, so I'll probably have to do it somewhat manually. But how? I heard that Cygwin might be able to do it, but I think MinGW and Cygwin would interfere with each other (environment variables). So I'd rather not do it that way.
MSYS2 might be a good answer to your needs. It has cygwin-like environment together with mingw3/mingw64 environment. And GCC version is 5.3
Link: https://msys2.github.io/

What is the difference between MinGW, MinGW-w64 and MinGW-builds?

What are the differences between MinGW, MinGW-w64 and MinGW-builds?
And which one should I use to compile c++ 11 source code with the Eclipse IDE on a Windows 8 machine?
MinGW is a GCC-port for Windows. Not all of the Windows API is supported (but for many programs the supported stuff is sufficient) and it´s only for 32bit-Programs (which often can run on 64bit-Windows too, but some can´t, and you can´t compile them as 64bit).
MinGW-w64 is a improved version which supports both 32bit and 64bit, and some more of the WinAPI (still not all, because thats much work, but more than MinGW).
MinGW-w64 only provides their source code, but no binaries to "just use" the compiler.
MinGW-builds is a somewhat separate project to provide binaries in the most useful configurations. To get a specialized build of MinGW-w64, manual compiling is still possible.
Using the MinGW-builds self-installer is the easiest way, if nothing unusual is needed. Also see here for help with the self-installer.
Mingw compiles your code to Windows binaries that run under Windows.
Windows subsystem for Linux (WSL) makes Linux binaries. You can install other Linux programs under WSL, except if you need a graphical interface. You can access the Windows filesystem from WSL, but not vice versa.
Cygwin makes Windows binaries that can run under Windows outside the Cygwin shell, as long as you have the Cygwin DLL. This gives a Linux-like environment that is fully compatible with Windows.

Where can I download GCC 4.3.2 binaries for Windows?

I have to write a c++ program, and i want to do this in vstudio 2010, because it's the most comfortable way for me. But later this code will be compiled in gcc 4.3.2 (ejudge). I can't find gcc 4.3.2 binaries for Windows, if there any ways to check correctness of gcc compilation? Or maybe anyone will help to find gcc binaries? I found this link http://tdm-gcc.tdragon.net/download but there i can't find 4.3.2 version binaries, only source code. Thanks.
MinGW, or Minimalist GNU for Windows, is a set of GNU compilers for Windows platforms. It's the easiest way to use G++ on windows platform. You could also use Cygwin, but it would be a bit of overkill.
As I recall g++ 4.3.2 was used in an older version of the Code::Blocks IDE, as the bundled compiler.
However, I'm currently unable to connect to [http://www.codeblocks.org], so I don't know if they provide downloads of older versions.