Check that it's defined in the first place and also check that wxUSE_MENUS is on if wxUSE_MENUBAR is.