]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Patch from Andre Reitz to correct a couple of bugs
[wxWidgets.git] / src / common / appbase.cpp
index 894d6a97725c6ff2cc8e8766a5d15303b9510712..c0af2ac2564d6427b09314cf8aef2401184eaf22 100644 (file)
@@ -45,7 +45,6 @@
 
 #if defined(__WXMSW__)
   #include  "wx/msw/wrapwin.h"  // includes windows.h for MessageBox()
-  #include  "wx/msw/debughlp.h"  // includes windows.h for MessageBox()
 #endif
 
 #if wxUSE_FONTMAP
@@ -69,7 +68,7 @@
 #endif // __WXMAC__
 
 #ifdef __WXDEBUG__
-    #ifdef wxUSE_STACKWALKER
+    #if wxUSE_STACKWALKER
         #include "wx/stackwalk.h"
         #ifdef __WXMSW__
             #include "wx/msw/debughlp.h"
     #endif // wxUSE_STACKWALKER
 #endif // __WXDEBUG__
 
+// wxABI_VERSION can be defined when compiling applications but it should be
+// left undefined when compiling the library itself, it is then set to its
+// default value in version.h
+#if wxABI_VERSION != wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + 99
+#error "wxABI_VERSION should not be defined when compiling the library"
+#endif
+
 // ----------------------------------------------------------------------------
 // private functions prototypes
 // ----------------------------------------------------------------------------
@@ -143,14 +149,6 @@ wxAppConsole::~wxAppConsole()
 
 bool wxAppConsole::Initialize(int& argc, wxChar **argv)
 {
-#if wxUSE_LOG
-    // If some code logged something before wxApp instance was created,
-    // wxLogStderr was set as the target. Undo it here by destroying the
-    // current target. It will be re-created next time logging is needed, but
-    // this time wxAppTraits will be used:
-    delete wxLog::SetActiveTarget(NULL);
-#endif // wxUSE_LOG
-
     // remember the command line arguments
     this->argc = argc;
     this->argv = argv;