#include "wx/build.h"
#include "wx/init.h" // we must declare wxEntry()
-class WXDLLIMPEXP_CORE wxApp;
+class WXDLLIMPEXP_BASE wxAppConsole;
class WXDLLIMPEXP_BASE wxAppTraits;
class WXDLLIMPEXP_BASE wxCmdLineParser;
class WXDLLIMPEXP_BASE wxLog;
// ----------------------------------------------------------------------------
// the type of the function used to create a wxApp object on program start up
-typedef wxApp* (*wxAppInitializerFunction)();
+typedef wxAppConsole* (*wxAppInitializerFunction)();
// ----------------------------------------------------------------------------
// constants
#include "wx/os2/app.h"
#endif
#else // !GUI
- // can't use typedef because wxApp forward declared as a class
- class WXDLLIMPEXP_BASE wxApp : public wxAppConsole
- {
- };
+ typedef wxAppConsole wxApp;
#endif // GUI/!GUI
// ----------------------------------------------------------------------------
// Use this macro if you want to define your own main() or WinMain() function
// and call wxEntry() from there.
#define IMPLEMENT_APP_NO_MAIN(appname) \
- wxApp *wxCreateApp() \
+ wxAppConsole *wxCreateApp() \
{ \
- wxApp::CheckBuildOptions(wxBuildOptions()); \
+ wxAppConsole::CheckBuildOptions(wxBuildOptions()); \
return new appname; \
} \
wxAppInitializer \
if ( fnCreate )
{
// he did, try to create the custom wxApp object
- app.Set((*fnCreate)());
+ //
+ // NB: cast is needed because for the backwards-compatibility
+ // reasons wxTheApp is really a wxApp and not just
+ // wxAppConsole...
+ app.Set((wxApp*)(*fnCreate)());
}
}