Here is the batch file command I used to compile the wxWidgets using the MinGW sub folder under Code::Blocks 10.05.
REM Add MinGW Bin folder to the system path
SET PATH=C:\Program Files\CodeBlocks\MinGW\bin;%PATH%
REM Change to the wxWidgets build directory
cd /D H:\SourceCode\OpenSourceCode\Libs\GUI\wxWidgets\wxWidgets-2.8.10-SJLJ\build\msw
REM Clean the release monolithic unicode DLL build
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 clean
REM Create the release monolithic unicode DLL build
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1
PAUSE
NOTE: The pause command is only needed if you run the command in a batch file and wish to see the build output.
NOTE: You need to adjust the "cd" command to where ever you download the wxWidgets source code.
I do NOT think it is safe to help you set the system environmental variable to add the MinGW Bin folder to it. If you do it wrong you can make PC non boot-able. That is why I adjust the PATH variable via the SET command instead.
NOTE: It takes my old PC about 3 hours to Compile a single build of wxWidgets; about the last hour of that is doing the link command.
Tim S.