You need to Link with the same exact wxWidgets your used to compile you project with.
(This also mean some defines must match your post says 2.4 compatible mode (WXWIN_COMPATIBILITY_2_4) is on during link; but, not during compile.)
If this was on windows, a wrong setup.h would be a possible cause; I do NOT think this is possible in Linux.
Tim S.