好吧,去官网
官网写着
Right-click on your "My Computer" icon and select "Properties".
Click on the "Advanced" tab, then on the "Environment Variables" button.
You should be presented with a dialog box with two text boxes. The top box shows your user settings. The PATH entry in this box is the one you want to modify. Note that the bottom text box allows you to change the system PATH variable. You should not alter the system path variable in any manner, or you will cause all sorts of problems for you and your computer!
Click on the PATH entry in the TOP box, then click on the "Edit" button
Scroll to the end of the string and at the end add
;<installation-directory>\bin
press OK -> OK -> OK and you are done.
NOTE: Substitute <installation-directory> with the FULL absolute path name of the installation target directory you chose (ie C:\MinGW);