GTK+ program compile and run

0 views
Skip to first unread message

GanuraG

unread,
Feb 3, 2010, 11:42:42 AM2/3/10
to DiscoLinux
http://zetcode.com/tutorials/gtktutorial/firstprograms/

#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;
}


save the program as simple.c
compile as
$gcc -o simple simple.c `pkg-config --libs --cflags gtk+-2.0`
run as
$./simple
--

Reply all
Reply to author
Forward
0 new messages