error when compiling wxPython

Hello everyone this error is what I got

In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                 from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                 from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined
In file included from /usr/local/include/wx/wx.h:15,
                 from src/helpers.h:16,
                 from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2095:1: warning: this is the location of the previous definition
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                 from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                 from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                 from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtkobject.h:46:1: warning: "GTK_OBJECT_GET_CLASS" redefined
In file included from /usr/local/include/wx/wx.h:15,
                 from src/helpers.h:16,
                 from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2094:1: warning: this is the location of the previous definition
In file included from src/helpers.cpp:28:
/usr/local/include/wx/gtk/win_gtk.h:23:29: gtk/gtkfeatures.h: No such file or directory
src/helpers.cpp: In function `long int wxPyGetWinHandle(wxWindow*)':
src/helpers.cpp:1618: error: `GdkWindowPrivate' undeclared (first use this
   function)
src/helpers.cpp:1618: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
src/helpers.cpp:1618: error: `bwin' undeclared (first use this function)
src/helpers.cpp:1618: error: parse error before `)' token
error: command 'gcc' failed with exit status 1

python: 2.3.2
wxGTK: 2.4.2
wxPython: cvs (same error I had under 2.4.2)
gcc: 3.3.2

what can I do???

well.... when I got in that kind of trouble I always searched a binary distribution :smiley:
You should ask yourself what you want to learn.... gcc or wxPython... :wink:

Respect,
Peter.

···

On Mon, 12 Jan 2004 01:06:00 +0100, bart van der hall <bart@bartgymnast.org> wrote:

what can I do???

Peter Damoc wrote:

···

On Mon, 12 Jan 2004 01:06:00 +0100, bart van der hall > <bart@bartgymnast.org> wrote:

what can I do???

well.... when I got in that kind of trouble I always searched a binary distribution :smiley:
You should ask yourself what you want to learn.... gcc or wxPython... :wink:

Respect,
Peter.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

I need wxPython to use another program.
and as had a own made LFS system, there isn't a binary distribution available

:smiley: LFS... well ofcourse there are binary distributions... install RPM, apt, or yum and get the binary that way.
it won't be a "pure" LFS/BLFS system BUT it will do the trick.

Respect,
Peter

···

On Mon, 12 Jan 2004 14:29:50 +0100, bart van der hall <bart@bartgymnast.org> wrote:

I need wxPython to use another program.
and as had a own made LFS system, there isn't a binary distribution available

bart van der hall wrote:

Hello everyone this error is what I got

In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
                from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                from /usr/include/gtk-2.0/gtk/gtk.h:33,
                from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined
In file included from /usr/local/include/wx/wx.h:15,
                from src/helpers.h:16,
                from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2095:1: warning: this is the location of the previous definition
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                from /usr/include/gtk-2.0/gtk/gtk.h:33,
                from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtkobject.h:46:1: warning: "GTK_OBJECT_GET_CLASS" redefined
In file included from /usr/local/include/wx/wx.h:15,
                from src/helpers.h:16,
                from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2094:1: warning: this is the location of the previous definition
In file included from src/helpers.cpp:28:
/usr/local/include/wx/gtk/win_gtk.h:23:29: gtk/gtkfeatures.h: No such file or directory
src/helpers.cpp: In function `long int wxPyGetWinHandle(wxWindow*)':
src/helpers.cpp:1618: error: `GdkWindowPrivate' undeclared (first use this
  function)
src/helpers.cpp:1618: error: (Each undeclared identifier is reported only once
  for each function it appears in.)
src/helpers.cpp:1618: error: `bwin' undeclared (first use this function)
src/helpers.cpp:1618: error: parse error before `)' token
error: command 'gcc' failed with exit status 1

Looks to me like it is trying to use gtk-2.0 headers, but wxWindows has been compiled for GTK 1.2.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

bart van der hall wrote:

Hello everyone this error is what I got

In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
                from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                from /usr/include/gtk-2.0/gtk/gtk.h:33,
                from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined
In file included from /usr/local/include/wx/wx.h:15,
                from src/helpers.h:16,
                from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2095:1: warning: this is the location of the previous definition
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                from /usr/include/gtk-2.0/gtk/gtk.h:33,
                from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtkobject.h:46:1: warning: "GTK_OBJECT_GET_CLASS" redefined
In file included from /usr/local/include/wx/wx.h:15,
                from src/helpers.h:16,
                from src/helpers.cpp:16:
/usr/local/include/wx/defs.h:2094:1: warning: this is the location of the previous definition
In file included from src/helpers.cpp:28:
/usr/local/include/wx/gtk/win_gtk.h:23:29: gtk/gtkfeatures.h: No such file or directory
src/helpers.cpp: In function `long int wxPyGetWinHandle(wxWindow*)':
src/helpers.cpp:1618: error: `GdkWindowPrivate' undeclared (first use this
  function)
src/helpers.cpp:1618: error: (Each undeclared identifier is reported only once
  for each function it appears in.)
src/helpers.cpp:1618: error: `bwin' undeclared (first use this function)
src/helpers.cpp:1618: error: parse error before `)' token
error: command 'gcc' failed with exit status 1

Looks to me like it is trying to use gtk-2.0 headers, but wxWindows has been compiled for GTK 1.2.

I have GTK 1.2.10 installed

so how to solve it?

bart van der hall wrote:

Robin Dunn wrote:

bart van der hall wrote:

Hello everyone this error is what I got

In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
                from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
                from /usr/include/gtk-2.0/gtk/gtkmisc.h:32,
                from /usr/include/gtk-2.0/gtk/gtklabel.h:31,
                from /usr/include/gtk-2.0/gtk/gtkaccellabel.h:34,
                from /usr/include/gtk-2.0/gtk/gtk.h:33,
                from src/helpers.cpp:26:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined

[...]

Looks to me like it is trying to use gtk-2.0 headers, but wxWindows has been compiled for GTK 1.2.

I have GTK 1.2.10 installed

so how to solve it?

Check how your wxGTK was configured and built. Does it also include the gtk headers from /usr/include/gtk-2.0? Do you have gtk-config on your system? What does it output when run like this: "gtk-config --cflags"? wxPython's build will use that command plus "wx-config --cxxflags" to get the compile flags and include dirs to use in its compile.

If you actually intended to build the GTK2 version then you need to put WXPORT=gtk2 on the setup.py commandline as described in the build docs.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!