From: Richard H. <rh...@le...> - 2004-12-02 08:18:40
|
On Thu, Dec 02, 2004 at 04:22:44AM +0300, Mikhail Ramendik wrote: > Hello, > > I can't compile iaxcomm. (I have wxGTK 2.4.2, also tried wxGTK CVS from > sometime in Novemvber; I also have gtk+ 1.2) > > Here's what I get: > > g++ -I../../lib -g -Wall `wx-config --cflags` `gtk-config --cflags` -c -o > main.o main.cc > In file included from /usr/include/gtk-1.2/gdk/gdk.h:31, > from app.h:50, > from main.h:29, > from main.cc:40: > /usr/include/gtk-1.2/gdk/gdktypes.h:52: conflicting types for `typedef gulong > GdkAtom' > /usr/include/wx/defs.h:2058: previous declaration as `typedef struct > _GdkAtom*GdkAtom' > /usr/include/gtk-1.2/gdk/gdktypes.h:57: conflicting types for `typedef struct > _GdkWindow GdkWindow' > /usr/include/wx/defs.h:2059: previous declaration as `typedef struct > _GdkDrawable GdkWindow' > /usr/include/gtk-1.2/gdk/gdktypes.h:58: conflicting types for `typedef struct > _GdkWindow GdkPixmap' > /usr/include/wx/defs.h:2061: previous declaration as `typedef struct > _GdkDrawable GdkPixmap' > /usr/include/gtk-1.2/gdk/gdktypes.h:59: conflicting types for `typedef struct > _GdkWindow GdkBitmap' > /usr/include/wx/defs.h:2060: previous declaration as `typedef struct > _GdkDrawable GdkBitmap' > make: *** [main.o] Error 1 > > The wx-users list advised that I sould get rid of `gtk-config --cflags`, but > this seems to trigger a different compile failure. With current iaxcomm cvs source I get: g++ -I../../lib -g -Wall -DVERSION=\"0.99pre6\" `wx-config --cflags` `gtk-config --cflags` -c -o main.o main.cc and: $ wx-config --cflags -I/usr/local/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $ gtk-config --cflags -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include I have gtk+ 1.2 from an rpm; the wx stuff I built from source. Your problem likely comes from here in include/wx/defs.h: #ifdef __WXGTK20__ typedef struct _GdkAtom *GdkAtom; <<<< You are gettting this typedef struct _GdkDrawable GdkWindow; typedef struct _GdkDrawable GdkBitmap; typedef struct _GdkDrawable GdkPixmap; #else // GTK+ 1.2 typedef gulong GdkAtom; <<<< I get this typedef struct _GdkWindow GdkWindow; typedef struct _GdkWindow GdkBitmap; typedef struct _GdkWindow GdkPixmap; #endif // GTK+ 1.2/2.0 So I guess in your 'wx-config --cflags' output you'll see -D__WXGTK20__, rather than -D__WXGTK__. Richard |