| 
 | 
 
首先说明一下:小弟刚接触GTK. 
我装了两个系统在硬盘上:一个windows xp,一个Fedora 8。在windows里的虚拟机上又装了个Fedora(不知道哪个版本)。我编了一GTK程序,在虚拟机上的linux上可以编译运行,但在Fedora 8下却编译不了。 
[zz63@zz GTK]$ yum info gtk+ 
Installed Packages 
Name   : gtk+ 
Arch   : i386 
Epoch  : 1 
Version: 1.2.10 
Release: 59.fc8 
Size   : 2.3 M 
Repo   : installed 
Summary: The GIMP ToolKit 
 
 
[zz63@zz GTK]$ yum info glib 
Installed Packages 
Name   : glib 
Arch   : i386 
Epoch  : 1 
Version: 1.2.10 
Release: 28.fc8 
Size   : 336 k 
Repo   : installed 
Summary: A library of handy utility functions 
 
 
出错如下: 
[zz63@zz GTK]$ gcc dialog.c -o dialog `pkg-config --cflags --libs gtk+-2.0` 
在包含自 /usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h:7 的文件中, 
                 从 /usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:11, 
                 从 /usr/lib/glib-2.0/include/glibconfig.h:11, 
                 从 /usr/include/glib-2.0/glib/gtypes.h:30, 
                 从 /usr/include/glib-2.0/glib/galloca.h:30, 
                 从 /usr/include/glib-2.0/glib.h:30, 
                 从 /usr/include/gtk-2.0/gdk/gdktypes.h:32, 
                 从 /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 从 /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 从 /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 从 /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 从 dialog.c:1: 
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:122:61: 错误:limits.h:没有那个文件或目录 
在包含自 /usr/include/glib-2.0/glib.h:36 的文件中, 
                 从 /usr/include/gtk-2.0/gdk/gdktypes.h:32, 
                 从 /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 从 /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 从 /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 从 /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 从 dialog.c:1: 
/usr/include/glib-2.0/glib/gbookmarkfile.h:24:18: 错误:time.h:没有那个文件或目录 
In file included from /usr/include/glib-2.0/glib.h:36, 
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:32, 
                 from /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 from /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 from /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 from dialog.c:1: 
/usr/include/glib-2.0/glib/gbookmarkfile.h:122: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:129: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:148: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:149: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_added’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:154: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:155: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_modified’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:160: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gbookmarkfile.h:161: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_bookmark_file_get_visited’ 
In file included from /usr/include/glib-2.0/glib.h:41, 
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:32, 
                 from /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 from /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 from /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 from dialog.c:1: 
/usr/include/glib-2.0/glib/gdate.h:170: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
/usr/include/glib-2.0/glib/gdate.h:224: 警告:‘struct tm’ 在形参表内部声明 
/usr/include/glib-2.0/glib/gdate.h:224: 警告:它的作用域仅限于此定义或声明,这可能并不是您想要的 
在包含自 /usr/include/pango-1.0/pango/pango.h:45 的文件中, 
                 从 /usr/include/gtk-2.0/gdk/gdktypes.h:33, 
                 从 /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 从 /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 从 /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 从 /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 从 dialog.c:1: 
/usr/include/pango-1.0/pango/pango-utils.h:25:19: 错误:stdio.h:没有那个文件或目录 
In file included from /usr/include/pango-1.0/pango/pango.h:45, 
                 from /usr/include/gtk-2.0/gdk/gdktypes.h:33, 
                 from /usr/include/gtk-2.0/gdk/gdkcolor.h:31, 
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:23, 
                 from /usr/include/gtk-2.0/gdk/gdk.h:30, 
                 from /usr/include/gtk-2.0/gtk/gtk.h:31, 
                 from dialog.c:1: 
/usr/include/pango-1.0/pango/pango-utils.h:34: 错误:expected ‘)’ before ‘*’ token 
In file included from /usr/include/gtk-2.0/gtk/gtkrecentaction.h:26, 
                 from /usr/include/gtk-2.0/gtk/gtk.h:146, 
                 from dialog.c:1: 
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:180: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_added’ 
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:181: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_modified’ 
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:182: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gtk_recent_info_get_visited’ 
/usr/include/gtk-2.0/gtk/gtkrecentmanager.h:188: 错误:expected declaration specifiers or ‘...’ before ‘time_t’ 
[zz63@zz GTK]$  
 
请教高手,我还要安装什么或怎样配置才能在Fedora 8下编译GTK程序?谢谢…… |   
 
 
 
 |