Can't Compile: error: `wxWindowVariant' undeclared

I'm having trouble compiling wxPython:

wxPython-2.5.1.5
wxGTK-2.5.1
gtk-2.2.4

gcc-3.3.2
python-2.2.3

···

-----------------------------------------------------------

$ python setup.py build_ext --inplace --debug WX_CONFIG=/unsup/wxgtk-2.5.1/bin/wx-config WXPORT=gtk2 UNICODE=1
Preparing CORE...
Preparing GLCANVAS...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
running build_ext
building '_core' extension
creating build-gtk2.unicode
creating build-gtk2.unicode/temp.linux-i686-2.2
creating build-gtk2.unicode/temp.linux-i686-2.2/src
creating build-gtk2.unicode/temp.linux-i686-2.2/src/gtk
gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -g -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -Iinclude -Isrc -I/unsup/wxgtk-2.5.1/lib/wx/include/gtk2ud-2.5 -I/unsup/wxgtk-2.5.1/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/python2.2 -c src/gtk/core_wrap.cpp -o build-gtk2.unicode/temp.linux-i686-2.2/src/gtk/core_wrap.o -g -O0
src/gtk/core_wrap.cpp: In function `PyObject*
   _wrap_Window_SetWindowVariant(PyObject*, PyObject*, PyObject*)':
src/gtk/core_wrap.cpp:21633: error: `wxWindowVariant' undeclared (first use
   this function)
src/gtk/core_wrap.cpp:21633: error: (Each undeclared identifier is reported
   only once for each function it appears in.)
src/gtk/core_wrap.cpp:21633: error: syntax error before `(' token
src/gtk/core_wrap.cpp:21637: error: syntax error before `)' token
src/gtk/core_wrap.cpp: In function `PyObject*
   _wrap_Window_GetWindowVariant(PyObject*, PyObject*, PyObject*)':
src/gtk/core_wrap.cpp:21663: error: `GetWindowVariant' undeclared (first use
   this function)
src/gtk/core_wrap.cpp: In function `void init_core()':
src/gtk/core_wrap.cpp:41958: error: `wxWINDOW_VARIANT_DEFAULT' undeclared
   (first use this function)
src/gtk/core_wrap.cpp:41959: error: `wxWINDOW_VARIANT_NORMAL' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41960: error: `wxWINDOW_VARIANT_SMALL' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41961: error: `wxWINDOW_VARIANT_MINI' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41962: error: `wxWINDOW_VARIANT_LARGE' undeclared (first
   use this function)
error: command 'gcc' failed with exit status 1

-----------------------------------------------------------

I'd appreciate and hints on what the problem is and how to fix it.
I'm not subscribed to the list, so please CC replies to me.

Thanks,

-param

Paramjit Oberoi wrote:

I'm having trouble compiling wxPython:

wxPython-2.5.1.5
wxGTK-2.5.1
gtk-2.2.4

gcc-3.3.2
python-2.2.3

[...]

   _wrap_Window_GetWindowVariant(PyObject*, PyObject*, PyObject*)':
src/gtk/core_wrap.cpp:21663: error: `GetWindowVariant' undeclared (first use
   this function)
src/gtk/core_wrap.cpp: In function `void init_core()':
src/gtk/core_wrap.cpp:41958: error: `wxWINDOW_VARIANT_DEFAULT' undeclared
   (first use this function)
src/gtk/core_wrap.cpp:41959: error: `wxWINDOW_VARIANT_NORMAL' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41960: error: `wxWINDOW_VARIANT_SMALL' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41961: error: `wxWINDOW_VARIANT_MINI' undeclared (first
   use this function)
src/gtk/core_wrap.cpp:41962: error: `wxWINDOW_VARIANT_LARGE' undeclared (first
   use this function)
error: command 'gcc' failed with exit status 1

-----------------------------------------------------------

I'd appreciate and hints on what the problem is and how to fix it.
I'm not subscribed to the list, so please CC replies to me.

You need to use the version of wxGTK that comes in the wxPythonSrc
tarball. It is a few weeks newer than wxGTK 2.5.1.

···

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

Robin Dunn wrote (Sat, Apr 10, 2004 at 11:20:15PM -0700) :

You need to use the version of wxGTK that comes in the wxPythonSrc
tarball. It is a few weeks newer than wxGTK 2.5.1.

Thanks, that did it. I remember older versions of wxPython had more
prominent warnings about only using the included version of wxGTK...
Maybe a note should be added to the top of BUILD.txt that says this
explicitly?

···

Paramjit Oberoi wrote:
> I'm having trouble compiling wxPython:
>
> wxPython-2.5.1.5
> wxGTK-2.5.1
> gtk-2.2.4
>
> gcc-3.3.2
> python-2.2.3
>
[...]
> _wrap_Window_GetWindowVariant(PyObject*, PyObject*, PyObject*)':
> src/gtk/core_wrap.cpp:21663: error: `GetWindowVariant' undeclared (first use
> this function)
> src/gtk/core_wrap.cpp: In function `void init_core()':
> src/gtk/core_wrap.cpp:41958: error: `wxWINDOW_VARIANT_DEFAULT' undeclared
> (first use this function)
> src/gtk/core_wrap.cpp:41959: error: `wxWINDOW_VARIANT_NORMAL' undeclared (first
> use this function)
> src/gtk/core_wrap.cpp:41960: error: `wxWINDOW_VARIANT_SMALL' undeclared (first
> use this function)
> src/gtk/core_wrap.cpp:41961: error: `wxWINDOW_VARIANT_MINI' undeclared (first
> use this function)
> src/gtk/core_wrap.cpp:41962: error: `wxWINDOW_VARIANT_LARGE' undeclared (first
> use this function)
> error: command 'gcc' failed with exit status 1
>
> -----------------------------------------------------------
>
> I'd appreciate and hints on what the problem is and how to fix it.
> I'm not subscribed to the list, so please CC replies to me.

You need to use the version of wxGTK that comes in the wxPythonSrc
tarball. It is a few weeks newer than wxGTK 2.5.1.

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