Okay, I managed to reproduce your error.
Try adding
C:\MinGW\msys\1.0\bin (your path may be different, look for the msys bin folder inside your Mingw directory).
to your system Path.
The three "The system cannot find the path specified." should go away and (hopefully) it should compile without other problems.
If you run into other problems, just ask
P.s. If you don't have this folder, use MinGW's installation manager to install some msys packages.
(if you need to know, the packages installed on my computer are: base, bash, bzip2, core, diffutils, dos2unix, file, findutils, gawk, grep, gzip, less, make, sed, tar, termcap, texinfo,xz, even though you probably don't need all of them, i don't know which ones are needed.)