Re: error compiling gnome-objc



> > I get the following error compiling gnome-objc. Could someone please help?
> > glib, gtk+, imlib, esound, orbit and gnome-libs compiled without errors.
> > 
> > In file included from /opt/gnome/include/gdk/gdktypes.h:25,
> >                  from /opt/gnome/include/gdk/gdk.h:23,
> >                  from /opt/gnome/include/gtk/gtkaccelgroup.h:26,
> >                  from obgtkAccelGroup.h:5,
> >                  from obgtkAccelGroup.m:1:
> > /opt/gnome/include/glib.h:1061: parse error before `id'
> > /opt/gnome/include/glib.h:1073: parse error before `id'
> > make[2]: *** [obgtkAccelGroup.lo] Error 1
> > make[2]: Leaving directory `/usr/local/src/gnomecvs/gnome-objc/obgtk'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/usr/local/src/gnomecvs/gnome-objc'
> > make: *** [all-recursive-am] Error 2
> > 
> > Olaf
> > 
>    I get this identical error.  gnome-objc, gnome-libs, libvfs from cvs
> 10/2/98:  ORBit, libIDL from cvs 10/1/98: glib-1.1.4, gtk+-1.1.3 and
> ImLib-1.8.0.  

Hi,

Take a look at /usr/lib/gcc-lib/<whatever>/include/objc/objc.h.
You will find:
--------------------
/*
** ObjC uses this typedef for untyped instances.
*/
typedef struct objc_object {
  struct objc_class*  class_pointer;
} *id;

/*
** Definition of method type.  When retrieving the implementation of a
** method, this is type of the pointer returned
*/
typedef id (*IMP)(id, SEL, ...);
--------------------

This clashes with glib.h, which has "id" as a variable in a prototype.
I opted for a minimalistic approach as I created the patch I sent to the
gnome-mailinglist, but Raja R Harinath's patch made it into glib.

So, try again, this should be already fixed in CVS tree.

kj
-- 
Kang-Jin Lee
lee@arco.met.fu-berlin.de



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