I installed WxWidgets using the Pack version 2.8, whereas, as fas as the coompiler is concerned, I'm using GCC 4.7.1.Both compilers (the one used to build wx and the one you're using) must match. If they don't match you'll have endless problems.
I did not explain my issue properly. I compiled using the other options like for example MONOLITHIC=1 so I have the suitable libraries but codeblocks does not recognize them.
Like explained at this link: http://wiki.wxwidgets.org/WxWidgets_Build_Configurations
Pre-compiled did not work for me, so I decided to build my own libraries as suggested in the first reply. I use GCC 4.7.1 and the build was pretty easy with no problems following also the tutorial found here: http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW
Everything perfect, just needed to copy and paste a couple of dlls in the release folder when trying to run the app outside the IDE.
If I try to build the libraries differently, with other options such as dynamic but monolithic, or static multi-lib, codeblocks reports an error when trying to create the project, saying that it cannot find a correct configuration in the folder provided. For example if I build the libraries with MONOLITHIC=1 and then select monolithic in the wizard codeblocks reports the error that I have just tried to explain. The libraries always build correctly with the options I want, but when codeblocks is instructed to use a different specification from Dll and unicode, it cannot find the right configuration.
Link for other flags:
http://wiki.wxwidgets.org/WxWidgets_Build_Configurations
Commands to build the libraries;
make -f makefile.gcc MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport" SHARED=1 UNICODE=1 BUILD=release
make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release
make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release
Only the last one works, unfortunately.
Thank you for your interest.
make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release clean
make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean