1

This is my understanding of the relationship between MinGW and MSYS.

When installing MinGW and its gcc toolchain, installing MSYS is optional.

With MSYS installed, you get bash and a few other tools that I assume are meant to be used with the MinGW gcc that you just installed. However, when you run the MSYS batch script that opens up a bash shell, gcc is not on your PATH. At this point you do one of two things:

  • You launch the MinGW installer again, and notice that you didn't select gcc under the MSYS category. You think to yourself, "didn't I already install gcc?" You wait for that package to download, and drop back to MSYS's bash shell. You run gcc --version and see that it's an ancient version of gcc from ten years ago. You then proceed to do the thing below, if you even realize that it's an option.

OR

  • You echo $PATH, to find that C:\MinGW\bin is on your path, but C:\MinGW\bin is not mounted. You add the proper mount command to your ~/.profile, and are happy to find that the recent version of gcc provided by MinGW is now on your PATH.

Why do MinGW and MSYS have separate versions of gcc? Why doesn't the user have access to the recent version of gcc provided by MinGW immediately within MSYS? I don't use Windows very often, and I was trying to use MinGW and MSYS to teach my brother C. I didn't want to be using a version of gcc from ten years ago. This behavior was baffling.

0

You must log in to answer this question.

Browse other questions tagged .