The issue seems to be that it is linking towards "wxFlatNotebookBase" while declaring "wxFlatNotebook".
$ grep -r ZN14wxFlatNotebook12SetSelectionEm .
Binary file ./src/sdk/.libs/editorbase.o matches
Binary file ./src/sdk/.libs/editormanager.o matches
Binary file ./src/sdk/.libs/libcodeblocks.0.0.1.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.0.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.dylib matches
Binary file ./src/sdk/.libs/messagemanager.o matches
Binary file ./src/sdk/.libs/projectmanager.o matches
Binary file ./src/src/app.o matches
Binary file ./src/src/main.o matches
$ grep -r ZN18wxFlatNotebookBase12SetSelectionEm .
Binary file ./src/sdk/.libs/libcodeblocks.0.0.1.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.0.dylib matches
Binary file ./src/sdk/.libs/libcodeblocks.dylib matches
Binary file ./src/sdk/wxFlatNotebook/.libs/libwxflatnotebook.a matches
Binary file ./src/sdk/wxFlatNotebook/.libs/wxFlatNotebook.o matches
$ echo __ZN14wxFlatNotebook12SetSelectionEm | c++filt
wxFlatNotebook::SetSelection(unsigned long)
$ echo __ZN18wxFlatNotebookBase12SetSelectionEm | c++filt
wxFlatNotebookBase::SetSelection(unsigned long)
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!