fix 0096aa5 (at least for mingw)
authorRobin Gareus <robin@gareus.org>
Thu, 12 Mar 2015 16:56:06 +0000 (17:56 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 12 Mar 2015 16:57:10 +0000 (17:57 +0100)
gtk2_ardour/main.cc

index faf0578701112ecd342d73a516cc35058cf1e417..7c46e1d10b3bf52f9fd580a3c02ef5f0beef079e 100644 (file)
@@ -203,20 +203,24 @@ console_madness_end ()
        }
 }
 
-#if defined(NDEBUG) && !defined(RDC_BUILD))
-// Since we don't ordinarily have access to stdout and stderr with
-// an MSVC app, let the user know we encountered a parsing error.
-static void
-command_line_parse_error (int* argc, char** argv[])
-{
-       Gtk::Main app(&argc, &argv); // Calls 'gtk_init()'
-       
-       Gtk::MessageDialog msg (_("\n   Ardour could not understand your command line      "),
-                                               false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
-       msg.set_title (_("An error was encountered while launching Ardour"));
-       msg.run ();
+static void command_line_parse_error (int *argc, char** argv[]) {}
+
+#elif (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
+
+// these are not used here. for MSVC see  gtk2_ardour/msvc/winmain.cc
+static void console_madness_begin () {}
+static void console_madness_end () {}
+
+static void command_line_parse_error (int *argc, char** argv[]) {
+        // Since we don't ordinarily have access to stdout and stderr with
+        // an MSVC app, let the user know we encountered a parsing error.
+        Gtk::Main app(&argc, &argv); // Calls 'gtk_init()'
+
+        Gtk::MessageDialog dlgReportParseError (_("\n   Ardour could not understand your command line      "),
+                                                      false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
+        dlgReportParseError.set_title (_("An error was encountered while launching Ardour"));
+        dlgReportParseError.run ();
 }
-#endif
 
 #else
 static void console_madness_begin () {}