wxGenericDirCtrl has to be declared when wxUSE_DIRDLG==1 or wxUSE_FILEDLG==1 (see src/common/dirctrlcmn.cpp).