Basic GTK on windows



Hello,
         I just made a simple program on windows after I got the libraries installed and had a couple of questions.  Is there a way to make the program run without a command prompt in the background (I'm not running it from an IDE)? Also, is there a way to include everything in the executable so people that don't have gtk+ installed will be able to use the app without a problem and without having to install it (this would be nice for gnome/KDE/XFCE also)?  Here is my source for the test program I wrote:

#include <gtk/gtk.h>

int main(int argc, char **argv) {
    GtkWidget *window;

    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    g_object_set(window, "title", "Test", NULL);
    g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL);

    gtk_widget_show_all(window);

    gtk_main();
    return 0;
}

Thanks for taking a look,

Josh


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]