_teo_,
I would expect this is a wx-config issue.
Execute
in the terminal. It should dump compiler flags used with gcc. Look for one starting with -I to determine which version of wxWidgets you're compiling with.
For example:
-I/usr/lib/wx/include/gtk-unicode-release-2.6
tells me that I'm using version 2.6, whereas
-I/opt/wx/2.7/lib/wx/include/gtk2-unicode-release-2.7
would tell me that I'm using version 2.7.
If wx-config is returning the wrong version, then you probably have more than one copy of wx-config on your system, and you need to change the default to the one you'd like to use.
In a terminal, exectue
sudo update-alternatives --config wx-config
This should show you a list of alternatives for wx-config. For me, it reports:
Selection Alternatives
----------------------------------------------------------
1 /usr/lib/wx/config/gtk2-unicode-release-2.6
2 /opt/wx/2.7/bin/wx-config
So I would choose 1 to use the 2.6 version for building codeblocks.
After I'm done building codeblocks, I would run update-alternatives again to switch back to 2.7, for use with compiling my own projects.
Does that help?