Hi.
I am compiling this program on Windows, with gcc (MinGW) and GTK+:
#include <gtk/gtk.h>
void *destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
int main(int argc, char *argv[])
{
// Initalize GTK+
gtk_init(&argc, &argv);
// Create GTK+ window
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(window, "destroy", G_CALLBACK(destroy), NULL);
// Show all widgets
gtk_widget_show_all(window);
// Enter loop
gtk_main();
// Exit program
return 0;
}
It compiles and runs, but the problem is that when I launch the program, it launches in a terminal window before opening the GUI window.
How do I prevent this from happening?