Yup, had removed the old libs but had some old stray headers left.
sudo rm -r /usr/local/include/codeblocks
It would be nice if the build scripts (i.e. autotools) could be fixed,
so that it looks in the local dirs before it looks in the system dirs... ?
It also fails to link if you have e.g. an unicode wx in $PREFIX and
a ansi wx in /usr/local, to name a common example that I run into
Moral: make sure to you remove all the objects,
and headers too!