Gtk+-2.0: First attempt



After some reflection on the matter, I decided I'd better look at 2.0
ASAP.  So, taking the advice of contributors here, I set about compiling
the helloworld program.  I cut and pasted the code from the Gtk+ 2.0
Tutorial available on the Gtk site.  I typed: "gcc `pkg-config --cflags
--libs gtk+-2.0` -o gtkhelloworld20 gtkhelloworld20.c" (working in $HOME to keep
from confusing code elsewhere).  Note that I didn't include 'Wall' as
specified in the tutorial (3.2 Compiling Hello World), so dunno what
else I'd have gotten had I done so.

I'm running Slackware 10.0 box stock full install.  It has
gtk+2-2.4.3-i486-1, pango-1.4.0-i486-1, pkgconfig-0.15.0-i486-1, and I
don't know what else is relevant.  Here's what I got.  This is cut and
pasted from the file 'gtk_errors' that I obtained by adding '2>
gtk_errors' to the compile command:

--------------
In file included from /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h:33,
                 from /usr/include/gtk-2.0/gdk/gdkcursor.h:5,
                 from /usr/include/gtk-2.0/gdk/gdk.h:31,
                 from /usr/include/gtk-2.0/gtk/gtk.h:31,
                 from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:170: error: parse
error before "G_GNUC_NULL_TERMINATED"
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:170: warning: data
definition has no type or storage class
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:191: error: parse
error before "G_GNUC_NULL_TERMINATED"
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:191: warning: data
definition has no type or storage class
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:208: error: parse
error before "G_GNUC_NULL_TERMINATED"
/usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:208: warning: data
definition has no type or storage class
In file included from /usr/include/gtk-2.0/gdk/gdk.h:34,
                 from /usr/include/gtk-2.0/gtk/gtk.h:31,
                 from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gdk/gdkdrawable.h:161: error: parse error before
"PangoMatrix"
/usr/include/gtk-2.0/gdk/gdkdrawable.h:359: error: parse error 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 gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gdk/gdkpango.h:69: error: parse error before
"PangoRenderer"
/usr/include/gtk-2.0/gdk/gdkpango.h:69: warning: no semicolon at end of
struct or union
/usr/include/gtk-2.0/gdk/gdkpango.h:72: error: parse error before '}'
token
/usr/include/gtk-2.0/gdk/gdkpango.h:84: error: parse error before
"PangoRendererClass"
/usr/include/gtk-2.0/gdk/gdkpango.h:84: warning: no semicolon at end of
struct or union
/usr/include/gtk-2.0/gdk/gdkpango.h:89: error: parse error before '*'
token
/usr/include/gtk-2.0/gdk/gdkpango.h:89: warning: data definition has no
type or storage class
/usr/include/gtk-2.0/gdk/gdkpango.h:90: error: parse error before '*'
token
/usr/include/gtk-2.0/gdk/gdkpango.h:90: warning: data definition has no
type or storage class
/usr/include/gtk-2.0/gdk/gdkpango.h:97: error: parse error before
"PangoRenderPart"
/usr/include/gtk-2.0/gdk/gdkpango.h:100: error: parse error before
"PangoRenderPart"
In file included from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:65: error: parse error before
"G_GNUC_NULL_TERMINATED"
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:65: warning: data definition
has no type or storage class
In file included from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                 from /usr/include/gtk-2.0/gtk/gtk.h:34,
                 from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gtk/gtklabel.h:133: error: parse error before
"PangoEllipsizeMode"
/usr/include/gtk-2.0/gtk/gtklabel.h:134: error: parse error before
"gtk_label_get_ellipsize"
/usr/include/gtk-2.0/gtk/gtklabel.h:134: warning: data definition has no
type or storage class
In file included from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gtk/gtk.h:119:35: gtk/gtkmenutoolbutton.h: No such
file or directory
/usr/include/gtk-2.0/gtk/gtk.h:122:28: gtk/gtkmodules.h: No such file or
directory
In file included from /usr/include/gtk-2.0/gtk/gtk.h:132,
                 from gtkhelloworld20.c:1:
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:144: error: parse error before
"PangoEllipsizeMode"
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:145: error: parse error before
"gtk_progress_bar_get_ellipsize"
/usr/include/gtk-2.0/gtk/gtkprogressbar.h:145: warning: data definition
has no type or storage class
--------------

Something isn't right here, me thinks.

I'm patiently awaiting Slackware 11.0, which will have the latest stable
packages, gtk+-2-2.8.x, IIRC from their site.  Until then, this is what
I've got, and the response here was that 2.4.3 should be at least
minimally usable.

Any ideas?

Thanks for reading,

Bill Tallman
  



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