Now linking against wxsmithlib and adding linker option '-z defs', result is much more manageable.
Build log:
-------------- Build: default in CustomButton ---------------
g++ -g -I/usr/include/codeblocks -I/usr/include/codeblocks/tinyxml -I/usr/include/codeblocks/scripting/include -I/usr/include/codeblocks/scripting/bindings -I/usr/include/codeblocks/scripting/sqplus -I/usr/include/codeblocks/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -march=i586 -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -c /home/guest/custom_widgets/wxlinux/wxthings/custombutton.cpp -o .objs/custombutton.o
g++ -g -I/usr/include/codeblocks -I/usr/include/codeblocks/tinyxml -I/usr/include/codeblocks/scripting/include -I/usr/include/codeblocks/scripting/bindings -I/usr/include/codeblocks/scripting/sqplus -I/usr/include/codeblocks/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -march=i586 -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -c /home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp -o .objs/wxscustombutton.o
g++ -shared .objs/custombutton.o .objs/wxscustombutton.o -o custombutton.so -z defs -lcodeblocks -pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -z defs -lwxsmithlib -lwxsmithlib
.objs/wxscustombutton.o: In function `wxsCustomButton::OnBuildPreview(wxWindow*, long)':
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:202: undefined reference to `wxCustomButton::CreateBitmapDisabled(wxBitmap const&) const'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:207: undefined reference to `wxCustomButton::SetMargins(wxSize const&, bool)'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:212: undefined reference to `wxCustomButton::SetLabelMargin(wxSize const&, bool)'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:217: undefined reference to `wxCustomButton::SetBitmapMargin(wxSize const&, bool)'
.objs/wxscustombutton.o: In function `wxCustomButton':
/home/guest/custom_widgets/wxlinux/wxthings/wxthings/include/wx/things/toggle.h:143: undefined reference to `vtable for wxCustomButton'
/home/guest/custom_widgets/wxlinux/wxthings/wxthings/include/wx/things/toggle.h:145: undefined reference to `wxCustomButton::Init()'
/home/guest/custom_widgets/wxlinux/wxthings/wxthings/include/wx/things/toggle.h:146: undefined reference to `wxCustomButton::Create(wxWindow*, int, wxString const&, wxBitmap const&, wxPoint const&, wxSize const&, long, wxValidator const&, wxString const&)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
7 errors, 0 warnings
It seems that ../wxthings/wxthings/.libs/libwxcustombutton.so is not being linked in.