Re: Hello world not show



How did you compile it? 

Putting your code in a file called try.c and running the following:

gcc -c try.c `pkg-config --cflags gtk+-3.0`
gcc -o try try.o `pkg-config --libs gtk+-3.0`

worked okay and running it put up an empty window.


On 06/04/14 09:21, Zhengrong Zang wrote:
I compiled code as below and without any problems, but nothing shown when run it, what should I do next?
/* example-start base base.c */ 
#include <gtk/gtk.h> 
int main( int   argc,
          char *argv[] )
{  
     GtkWidget *window; 
     gtk_init (&argc, &argv); 
     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);      
     gtk_widget_show  (window); 
     gtk_main (); 
     return(0);
} 
/* example-end */


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



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