#sudo apt-get install build-essential
after install finish, run below program check gcc can work
/* start testc.c*/
#include
int main()
{
printf("Hello Ubuntu!\n");
return 0;
}
/*finish testc.c*/
open terminal compile testc.c
$ gcc testc.c -o testc
$ ./testc
Check it show :Hello Ubuntu!
Install gtk
open terminal
$sudo apt-get install libgtk2.0-dev
after install finish, run below program check gtk can work
/*gtkhello.c start*/
#include
int main( int argc, char *argv[] )
{
GtkWidget *window;
gtk_init (&argc, &argv);
window=gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
gtk_widget_show (window);
gtk_main();
return(0);
}
/*gtkhello.c end*/
$ gcc gtkhello.c -o gtktest `pkg-config --cflags --libs gtk+-2.0`
$ ./gtktest
check it can show a window.
you can use below command to search gtk install pkg
$sudo apt-cache search libgtk


chaipeng 于 2011-08-17 13:54:52发表:
ym :0)1
shengcheng 于 2009-12-08 15:27:23发表:
why don't you said again in chinese?
Serval 于 2009-12-06 12:42:01发表:
Well, Thank you!
I'm looking for information like this.
tomorrow207 于 2009-12-02 10:27:54发表:
恩,回去试试