Je viens d'installer GTK-2.0 (Debien, par apt-get) et je viens d'essayer de compiler un exemple trouvé sur un tutorial :
Code :
- #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;
- }
|
J'ai compilé en tapant la ligne suivante :
gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0`
Le compilateur me répond :
In file included from /usr/include/gtk-2.0/gdk/gdk.h:34,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from base.c:1:
/usr/include/gtk-2.0/gdk/gdkdrawable.h:161: error: erreur d'analyse syntaxique before "PangoMatrix"
/usr/include/gtk-2.0/gdk/gdkdrawable.h:359: error: erreur d'analyse syntaxique before "PangoMatrix"
In file included from /usr/include/gtk-2.0/gdk/gdk.h:43,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from base.c:1:
/usr/include/gtk-2.0/gdk/gdkpango.h:69: error: erreur d'analyse syntaxique before "PangoRenderer"
/usr/include/gtk-2.0/gdk/gdkpango.h:69: attention : pas de point virgule à la fin de la structure ou de l'union
/usr/include/gtk-2.0/gdk/gdkpango.h:72: error: erreur d'analyse syntaxique before '}' token
/usr/include/gtk-2.0/gdk/gdkpango.h:84: error: erreur d'analyse syntaxique before "PangoRendererClass"
/usr/include/gtk-2.0/gdk/gdkpango.h:84: attention : pas de point virgule à la fin de la structure ou de l'union
/usr/include/gtk-2.0/gdk/gdkpango.h:89: error: erreur d'analyse syntaxique before '*' token
/usr/include/gtk-2.0/gdk/gdkpango.h:89: attention : data definition has no type or storage class
/usr/include/gtk-2.0/gdk/gdkpango.h:90: error: erreur d'analyse syntaxique before '*' token
/usr/include/gtk-2.0/gdk/gdkpango.h:90: attention : data definition has no type or storage class
/usr/include/gtk-2.0/gdk/gdkpango.h:97: error: erreur d'analyse syntaxique before "PangoRenderPart"
/usr/include/gtk-2.0/gdk/gdkpango.h:100: error: erreur d'analyse syntaxique before "PangoRenderPart"
In file included from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
from /usr/include/gtk-2.0/gtk/gtk.h:34,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtklabel.h:133: error: erreur d'analyse syntaxique before "PangoEllipsizeMode"
/usr/include/gtk-2.0/gtk/gtklabel.h:134: error: erreur d'analyse syntaxique before "gtk_label_get_ellipsize"
/usr/include/gtk-2.0/gtk/gtklabel.h:134: attention : data definition has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtk.h:132,
from base.c:1:
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:144: error: erreur d'analyse syntaxique before "PangoEllipsizeMode"
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:145: error: erreur d'analyse syntaxique before "gtk_progress_bar_get_ellipsize"
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:145: attention : data definition has no type or storage class
zsh: exit 1 gcc base.c -o base `pkg-config --cflags gtk+-2.0`
Quelqu'un sait-il d'où vient l'erreur