]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/app.h
Set svn properties correctly for the newly added files.
[wxWidgets.git] / include / wx / app.h
index b5d2ea9a958393b552ef056c7b36b429a0fba37c..965ffaf723aa26dcb8c7f523d216c08202259a99 100644 (file)
 #include "wx/cmdargs.h"     // for wxCmdLineArgsArray used by wxApp::argv
 #include "wx/init.h"        // we must declare wxEntry()
 #include "wx/intl.h"        // for wxLayoutDirection
+#include "wx/log.h"         // for wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
 
 class WXDLLIMPEXP_FWD_BASE wxAppConsole;
 class WXDLLIMPEXP_FWD_BASE wxAppTraits;
 class WXDLLIMPEXP_FWD_BASE wxCmdLineParser;
 class WXDLLIMPEXP_FWD_BASE wxEventLoopBase;
-class WXDLLIMPEXP_FWD_BASE wxLog;
 class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
 
 #if wxUSE_GUI
@@ -35,6 +35,11 @@ class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
     class WXDLLIMPEXP_FWD_CORE wxWindow;
 #endif
 
+// this macro should be used in any main() or equivalent functions defined in wx
+#define wxDISABLE_DEBUG_SUPPORT() \
+    wxDISABLE_ASSERTS_IN_RELEASE_BUILD(); \
+    wxDISABLE_DEBUG_LOGGING_IN_RELEASE_BUILD()
+
 // ----------------------------------------------------------------------------
 // typedefs
 // ----------------------------------------------------------------------------
@@ -772,8 +777,13 @@ public:
 // your compiler really, really wants main() to be in your main program (e.g.
 // hello.cpp). Now IMPLEMENT_APP should add this code if required.
 
-#define IMPLEMENT_WXWIN_MAIN_CONSOLE \
-        int main(int argc, char **argv) { return wxEntry(argc, argv); }
+#define IMPLEMENT_WXWIN_MAIN_CONSOLE                                          \
+    int main(int argc, char **argv)                                           \
+    {                                                                         \
+        wxDISABLE_DEBUG_SUPPORT();                                            \
+                                                                              \
+        return wxEntry(argc, argv);                                           \
+    }
 
 // port-specific header could have defined it already in some special way
 #ifndef IMPLEMENT_WXWIN_MAIN