the build options are now checked in the application, not the library which allows to avoid having to define wxGetBuildOptions()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,15 +74,6 @@
|
||||
|
||||
wxAppBase::wxAppBase()
|
||||
{
|
||||
// this function is defined by IMPLEMENT_APP() macro in the user code
|
||||
extern const wxBuildOptions& wxGetBuildOptions();
|
||||
|
||||
if ( !CheckBuildOptions(wxGetBuildOptions()) )
|
||||
{
|
||||
wxLogFatalError(_T("Mismatch between the program and library build ")
|
||||
_T("versions detected."));
|
||||
}
|
||||
|
||||
wxTheApp = (wxApp *)this;
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_2
|
||||
@@ -375,9 +366,17 @@ bool wxAppBase::CheckBuildOptions(const wxBuildOptions& opts)
|
||||
int verMaj = wxMAJOR_VERSION,
|
||||
verMin = wxMINOR_VERSION;
|
||||
|
||||
return wxCMP(isDebug) && wxCMP(verMaj) && wxCMP(verMin);
|
||||
if ( !(wxCMP(isDebug) && wxCMP(verMaj) && wxCMP(verMin)) )
|
||||
{
|
||||
wxLogFatalError(_T("Mismatch between the program and library build ")
|
||||
_T("versions detected."));
|
||||
|
||||
// normally wxLogFatalError doesn't return
|
||||
return FALSE;
|
||||
}
|
||||
#undef wxCMP
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
Reference in New Issue
Block a user