codeblocks should be build against wxWidgets 2.8.4
I don't know if there is an official repository for Ubuntu,
if not you can take one of these:
http://apt.tt-solutions.com/ubuntu/ dapper main
http://apt.tt-solutions.com/ubuntu/ edgy main
http://apt.tt-solutions.com/ubuntu/ feisty main
key-import to apt's trusted keys:
wget -q http://www.tt-solutions.com/vz/key.asc -O- | sudo apt-key add -
to see which version wx-config normally uses you can try
and to see which configuration it selects use
wx-config --selected-config
all options of wx-config with