Go to "Setup -> Compiler [and debugger (depends on the version of C::B)] -> Global compiler settings -> GCC (or something like that) -> Tooƶchain settings".
First try autodetect to find the path the compiler is installed in.
If that does not work, chose the installation directory manual. Use the base folder (the one taht contains the bin-subdirectory, not the bin subdirectory itself !!).
Make sure the names of the executables are correct (they migvht vary between MinGW versions, with and without -dw2, -sjlj or mingw32- etc).