Basic GTK on windows

View: New views
3 Messages — Rating Filter:   Alert me  

Basic GTK on windows

by joshua.rh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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

_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Basic GTK on windows

by Lucas Hermann Negri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1º - Run without prompt: compile with -Wl,-subsystem,windows
2º - Just put all the dlls in your application folder

On Fri, Jul 3, 2009 at 2:43 PM, <joshua.rh@...> wrote:

> 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
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@...
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>



--
http://oproj.tuxfamily.org
_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: Basic GTK on windows

by Michael Torrie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lucas Hermann Negri wrote:
> 1º - Run without prompt: compile with -Wl,-subsystem,windows
> 2º - Just put all the dlls in your application folder

#3 - put your standard etc lib, etc folders relative to the folder where
the dlls are.

_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list