Cannot find g++ after msys2 install

Abdul Qadoos 1 Reputation point

I want to install g++ so I can compile and run C++ code in VScode.

I started by trying to follow the VSCode-provided guide which states I need to install mysys. I tried installing msys2 per the given instructions, but running g++ --version in Command Prompt returned 'g++' is not recognized.

I then tried adding C:\msys64\mingw64\bin to the path variable under 'User variables for Solebay' (Windows 11, System>About>Advanced System Settings>Environment Variables). g++ was still not found.

Second approach:

As seen here I tried unzipping directly into C:\ as well as adding C:\MinGW64\bin to my path. Again, g++ is not recognised.

This was easy on Ubuntu but I'm lost with Windows. What on earth am I doing?

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,626 questions
0 comments No comments
{count} votes