I installed MinGW and MSYS on my Windows 7 computer. I added C:\\Program Files (x86)\\MinGW\\bin to my path. Commands such as gcc and g++
C:\\Program Files (x86)\\MinGW\\bin
gcc
g++
C:\Program files\xxx has spaces in it! Since shell scripts are involved, spaces are significant and have to be escaped. Hence this path will not work with mingw. The documentation recommends to install MingW in C:\MingW.