Start -> Control Panel -> System -> Advanced -> Environment Variables
Then, add a new variable under System Variables called "MINGDIR" with the path to your MinGW directory (not bin, just the root, like C:\MinGW [mine is "G:\MinGW" without the "'s]).
Select the variable PATH under System Variables, click Edit, and append the path to MinGW's BIN, INCLUDE, and LIB directories. Restart any applications that will use it (and command prompts) and it should work.
Then, add a new variable under System Variables called "MINGDIR" with the path to your MinGW directory (not bin, just the root, like C:\MinGW [mine is "G:\MinGW" without the "'s]).
Select the variable PATH under System Variables, click Edit, and append the path to MinGW's BIN, INCLUDE, and LIB directories. Restart any applications that will use it (and command prompts) and it should work.