[wxPython] wx.cpp compile fails with src/gtk/wx.cpp:61: warning: `struct PyObject * t_output_helper(PyObject *, PyObject *)' defined but not used

I've just built wxGTK-2.3.1 and now its time for something completely....

except it won't build. wink wink nudge nudge...
You've built it haven't you? ... What's it like?

The problem compile is:

copying wxPsrc/gtk/wx.cpp: In function `struct PyObject * ptrset(PyObject *,
PyObject *, int, char *)':
src/gtk/wx.cpp:381: warning: unused variable `struct PyObject * obj'
src/gtk/wx.cpp: In function `struct PyObject * ptradd(PyObject *, int)':
src/gtk/wx.cpp:467: warning: `struct PyObject * obj' might be used
uninitialized in this function
src/gtk/wx.cpp: In function `void initwxc(...)':
src/gtk/wx.cpp:1886: `wxFRAME_NO_TASKBAR' undeclared (first use this function)
src/gtk/wx.cpp:1886: (Each undeclared identifier is reported only once
src/gtk/wx.cpp:1886: for each function it appears in.)
src/gtk/wx.cpp:1887: `wxFRAME_EX_CONTEXTHELP' undeclared (first use this
function)
src/gtk/wx.cpp:1914: `wxADJUST_MINSIZE' undeclared (first use this function)
src/gtk/wx.cpp:1985: `wxLC_HRULES' undeclared (first use this function)
src/gtk/wx.cpp:1986: `wxLC_VRULES' undeclared (first use this function)
src/gtk/wx.cpp:2091: `wxCHANGE_DIR' undeclared (first use this function)
src/gtk/wx.cpp:2319: `wxCURSOR_ARROWWAIT' undeclared (first use this function)
src/gtk/wx.cpp:2419: `wxEVT_MOUSEWHEEL' undeclared (first use this function)
src/gtk/wx.cpp:2500: `wxEVT_HELP' undeclared (first use this function)
src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
function)
src/gtk/wx.cpp: At top level:
src/gtk/wx.cpp:61: warning: `struct PyObject * t_output_helper(PyObject *,
PyObject *)' defined but not used
error: command 'gcc' failed with exit status 1

The complete log file:

Preparing CORE...
Preparing GLCANVAS...copying wxPsrc/gtk/wx.cpp: In function `struct PyObject
* ptrset(PyObject *, PyObject *, int, char *)':
src/gtk/wx.cpp:381: warning: unused variable `struct PyObject * obj'
src/gtk/wx.cpp: In function `struct PyObject * ptradd(PyObject *, int)':
src/gtk/wx.cpp:467: warning: `struct PyObject * obj' might be used
uninitialized in this function
src/gtk/wx.cpp: In function `void initwxc(...)':
src/gtk/wx.cpp:1886: `wxFRAME_NO_TASKBAR' undeclared (first use this function)
src/gtk/wx.cpp:1886: (Each undeclared identifier is reported only once
src/gtk/wx.cpp:1886: for each function it appears in.)
src/gtk/wx.cpp:1887: `wxFRAME_EX_CONTEXTHELP' undeclared (first use this
function)
src/gtk/wx.cpp:1914: `wxADJUST_MINSIZE' undeclared (first use this function)
src/gtk/wx.cpp:1985: `wxLC_HRULES' undeclared (first use this function)
src/gtk/wx.cpp:1986: `wxLC_VRULES' undeclared (first use this function)
src/gtk/wx.cpp:2091: `wxCHANGE_DIR' undeclared (first use this function)
src/gtk/wx.cpp:2319: `wxCURSOR_ARROWWAIT' undeclared (first use this function)
src/gtk/wx.cpp:2419: `wxEVT_MOUSEWHEEL' undeclared (first use this function)
src/gtk/wx.cpp:2500: `wxEVT_HELP' undeclared (first use this function)
src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
function)
src/gtk/wx.cpp: At top level:
src/gtk/wx.cpp:61: warning: `struct PyObject * t_output_helper(PyObject *,
PyObject *)' defined but not used
error: command 'gcc' failed with exit status 1
Preparing OGL...
Preparing STC...
Preparing XRC...
running build
running build_py
creating build
creating build/lib.linux-ppc-2.1
creating build/lib.linux-ppc-2.1/wxPython
copying wxPython/wx.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/windows.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/windows2.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/windows3.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/events.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/misc.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/misc2.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/gdi.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/mdi.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/controls.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/controls2.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/cmndlgs.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/stattool.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/frames.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/image.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/printfw.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/sizers.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/clip_dnd.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/filesys.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/streams.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/__init__.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/__version__.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/grid.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/html.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/htmlhelp.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/utils.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/calendar.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/glcanvas.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/ogl.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/oglbasic.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/oglshapes.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/oglshapes2.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/oglcanvas.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/stc_.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/stc.py -> build/lib.linux-ppc-2.1/wxPython
copying wxPython/xrc.py -> build/lib.linux-ppc-2.1/wxPython
creating build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/CDate.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/__init__.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/activexwrapper.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/anchors.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/buttons.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/calendar.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/colourdb.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/colourselect.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/dialogs.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/fancytext.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/filebrowsebutton.py ->
build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/floatbar.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/grids.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/imagebrowser.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/infoframe.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/layoutf.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/mvctree.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/pyshell.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/rpcMixin.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/shell.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/splashscreen.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPsrc/gtk/wx.cpp: In function `struct PyObject * ptrset(PyObject *,
PyObject *, int, char *)':
src/gtk/wx.cpp:381: warning: unused variable `struct PyObject * obj'
src/gtk/wx.cpp: In function `struct PyObject * ptradd(PyObject *, int)':
src/gtk/wx.cpp:467: warning: `struct PyObject * obj' might be used
uninitialized in this function
src/gtk/wx.cpp: In function `void initwxc(...)':
src/gtk/wx.cpp:1886: `wxFRAME_NO_TASKBAR' undeclared (first use this function)
src/gtk/wx.cpp:1886: (Each undeclared identifier is reported only once
src/gtk/wx.cpp:1886: for each function it appears in.)
src/gtk/wx.cpp:1887: `wxFRAME_EX_CONTEXTHELP' undeclared (first use this
function)
src/gtk/wx.cpp:1914: `wxADJUST_MINSIZE' undeclared (first use this function)
src/gtk/wx.cpp:1985: `wxLC_HRULES' undeclared (first use this function)
src/gtk/wx.cpp:1986: `wxLC_VRULES' undeclared (first use this function)
src/gtk/wx.cpp:2091: `wxCHANGE_DIR' undeclared (first use this function)
src/gtk/wx.cpp:2319: `wxCURSOR_ARROWWAIT' undeclared (first use this function)
src/gtk/wx.cpp:2419: `wxEVT_MOUSEWHEEL' undeclared (first use this function)
src/gtk/wx.cpp:2500: `wxEVT_HELP' undeclared (first use this function)
src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
function)
src/gtk/wx.cpp: At top level:
src/gtk/wx.cpp:61: warning: `struct PyObject * t_output_helper(PyObject *,
PyObject *)' defined but not used
error: command 'gcc' failed with exit status 1
ython/lib/vtk.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/wxPlotCanvas.py -> build/lib.linux-ppc-2.1/wxPython/lib
copying wxPython/lib/wxpTag.py -> build/lib.linux-ppc-2.1/wxPython/lib
creating build/lib.linux-ppc-2.1/wxPython/lib/editor
copying wxPython/lib/editor/__init__.py ->
build/lib.linux-ppc-2.1/wxPython/lib/editor
copying wxPython/lib/editor/editor.py ->
build/lib.linux-ppc-2.1/wxPython/lib/editor
copying wxPython/lib/editor/py_editor.py ->
build/lib.linux-ppc-2.1/wxPython/lib/editor
copying wxPython/lib/editor/tokenizer.py ->
build/lib.linux-ppc-2.1/wxPython/lib/editor
running build_ext
building 'wxc' extension
creating build/temp.linux-ppc-2.1
creating build/temp.linux-ppc-2.1/src
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_GLOBAL -DHAVE_CONFIG_H
-DWXP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.1 -c src/helpers.cpp -o
build/temp.linux-ppc-2.1/src/helpers.o -I/usr/local/include
-I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -I/usr/lib/glib/include -I/usr/X11R6/include
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_GLOBAL -DHAVE_CONFIG_H
-DWXP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.1 -c src/libpy.c -o
build/temp.linux-ppc-2.1/src/libpy.o -I/usr/local/include
-I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -I/usr/lib/glib/include -I/usr/X11R6/include creating
build/temp.linux-ppc-2.1/src/gtk
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_GLOBAL -DHAVE_CONFIG_H
-DWXP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.1 -c src/gtk/wx.cpp -o
build/temp.linux-ppc-2.1/src/gtk/wx.o -I/usr/local/include
-I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -I/usr/lib/glib/include -I/usr/X11R6/include
Preparing CORE...
Preparing GLCANVAS...
Preparing OGL...
Preparing STC...
Preparing XRC...
running install
running build
running build_py
not copying wxPython/wx.py (output up-to-date)
not copying wxPython/windows.py (output up-to-date)
not copying wxPython/windows2.py (output up-to-date)
not copying wxPython/windows3.py (output up-to-date)
not copying wxPython/events.py (output up-to-date)
not copying wxPython/misc.py (output up-to-date)
not copying wxPython/misc2.py (output up-to-date)
not copying wxPython/gdi.py (output up-to-date)
not copying wxPython/mdi.py (output up-to-date)
not copying wxPython/controls.py (output up-to-date)
not copying wxPython/controls2.py (output up-to-date)
not copying wxPython/cmndlgs.py (output up-to-date)
not copying wxPython/stattool.py (output up-to-date)
not copying wxPython/frames.py (output up-to-date)
not copying wxPython/image.py (output up-to-date)
not copying wxPython/printfw.py (output up-to-date)
not copying wxPython/sizers.py (output up-to-date)
not copying wxPython/clip_dnd.py (output up-to-date)
not copying wxPython/filesys.py (output up-to-date)
not copying wxPython/streams.py (output up-to-date)
not copying wxPython/__init__.py (output up-to-date)
not copying wxPython/__version__.py (output up-to-date)
not copying wxPython/grid.py (output up-to-date)
not copying wxPython/html.py (output up-to-date)
not copying wxPython/htmlhelp.py (output up-to-date)
not copying wxPython/utils.py (output up-to-date)
not copying wxPython/calendar.py (output up-to-date)
not copying wxPython/glcanvas.py (output up-to-date)
not copying wxPython/ogl.py (output up-to-date)
not copying wxPython/oglbasic.py (output up-to-date)
not copying wxPython/oglshapes.py (output up-to-date)
not copying wxPython/oglshapes2.py (output up-to-date)
not copying wxPython/oglcanvas.py (output up-to-date)
not copying wxPython/stc_.py (output up-to-date)
not copying wxPython/stc.py (output up-to-date)
not copying wxPython/xrc.py (output up-to-date)
not copying wxPython/lib/CDate.py (output up-to-date)
not copying wxPython/lib/__init__.py (output up-to-date)
not copying wxPython/lib/activexwrapper.py (output up-to-date)
not copying wxPython/lib/anchors.py (output up-to-date)
not copying wxPython/lib/buttons.py (output up-to-date)
not copying wxPython/lib/calendar.py (output up-to-date)
not copying wxPython/lib/colourdb.py (output up-to-date)
not copying wxPython/lib/colourselect.py (output up-to-date)
not copying wxPython/lib/dialogs.py (output up-to-date)
not copying wxPython/lib/fancytext.py (output up-to-date)
not copying wxPython/lib/filebrowsebutton.py (output up-to-date)
not copying wxPython/lib/floatbar.py (output up-to-date)
not copying wxPython/lib/grids.py (output up-to-date)
not copying wxPython/lib/imagebrowser.py (output up-to-date)
not copying wxPython/lib/infoframe.py (output up-to-date)
not copying wxPython/lib/layoutf.py (output up-to-date)
not copying wxPython/lib/mvctree.py (output up-to-date)
not copying wxPython/lib/pyshell.py (output up-to-date)
not copying wxPython/lib/rpcMixin.py (output up-to-date)
not copying wxPython/lib/shell.py (output up-to-date)
not copying wxPython/lib/splashscreen.py (output up-to-date)
not copying wxPython/lib/vtk.py (output up-to-date)
not copying wxPython/lib/wxPlotCanvas.py (output up-to-date)
not copying wxPython/lib/wxpTag.py (output up-to-date)
not copying wxPython/lib/editor/__init__.py (output up-to-date)
not copying wxPython/lib/editor/editor.py (output up-to-date)
not copying wxPython/lib/editor/py_editor.py (output up-to-date)
not copying wxPython/lib/editor/tokenizer.py (output up-to-date)
running build_ext
building 'wxc' extension
skipping src/helpers.cpp (build/temp.linux-ppc-2.1/src/helpers.o up-to-date)
skipping src/libpy.c (build/temp.linux-ppc-2.1/src/libpy.o up-to-date)
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_GLOBAL -DHAVE_CONFIG_H
-DWXP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.1 -c src/gtk/wx.cpp -o
build/temp.linux-ppc-2.1/src/gtk/wx.o -I/usr/local/include
-I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO_CHECK_CASTS
-D__WXGsrc/gtk/wx.cpp: In function `struct PyObject * ptrset(PyObject *,
PyObject *, int, char *)':
src/gtk/wx.cpp:381: warning: unused variable `struct PyObject * obj'
src/gtk/wx.cpp: In function `struct PyObject * ptradd(PyObject *, int)':
src/gtk/wx.cpp:467: warning: `struct PyObject * obj' might be used
uninitialized in this function
src/gtk/wx.cpp: In function `void initwxc(...)':
src/gtk/wx.cpp:1886: `wxFRAME_NO_TASKBAR' undeclared (first use this function)
src/gtk/wx.cpp:1886: (Each undeclared identifier is reported only once
src/gtk/wx.cpp:1886: for each function it appears in.)
src/gtk/wx.cpp:1887: `wxFRAME_EX_CONTEXTHELP' undeclared (first use this
function)
src/gtk/wx.cpp:1914: `wxADJUST_MINSIZE' undeclared (first use this function)
src/gtk/wx.cpp:1985: `wxLC_HRULES' undeclared (first use this function)
src/gtk/wx.cpp:1986: `wxLC_VRULES' undeclared (first use this function)
src/gtk/wx.cpp:2091: `wxCHANGE_DIR' undeclared (first use this function)
src/gtk/wx.cpp:2319: `wxCURSOR_ARROWWAIT' undeclared (first use this function)
src/gtk/wx.cpp:2419: `wxEVT_MOUSEWHEEL' undeclared (first use this function)
src/gtk/wx.cpp:2500: `wxEVT_HELP' undeclared (first use this function)
src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
function)
src/gtk/wx.cpp: At top level:
src/gtk/wx.cpp:61: warning: `struct PyObject * t_output_helper(PyObject *,
PyObject *)' defined but not used
error: command 'gcc' failed with exit status 1
TK__ -I/usr/lib/glib/include -I/usr/X11R6/include

···

#

I've just built wxGTK-2.3.1 and now its time for something completely....

except it won't build. wink wink nudge nudge...
You've built it haven't you? ... What's it like?

The problem compile is:

copying wxPsrc/gtk/wx.cpp: In function `struct PyObject * ptrset(PyObject

···

*,

PyObject *, int, char *)':
src/gtk/wx.cpp:381: warning: unused variable `struct PyObject * obj'
src/gtk/wx.cpp: In function `struct PyObject * ptradd(PyObject *, int)':
src/gtk/wx.cpp:467: warning: `struct PyObject * obj' might be used
uninitialized in this function
src/gtk/wx.cpp: In function `void initwxc(...)':
src/gtk/wx.cpp:1886: `wxFRAME_NO_TASKBAR' undeclared (first use this

function)

src/gtk/wx.cpp:1886: (Each undeclared identifier is reported only once
src/gtk/wx.cpp:1886: for each function it appears in.)
src/gtk/wx.cpp:1887: `wxFRAME_EX_CONTEXTHELP' undeclared (first use this
function)
src/gtk/wx.cpp:1914: `wxADJUST_MINSIZE' undeclared (first use this

function)

src/gtk/wx.cpp:1985: `wxLC_HRULES' undeclared (first use this function)
src/gtk/wx.cpp:1986: `wxLC_VRULES' undeclared (first use this function)
src/gtk/wx.cpp:2091: `wxCHANGE_DIR' undeclared (first use this function)
src/gtk/wx.cpp:2319: `wxCURSOR_ARROWWAIT' undeclared (first use this

function)

src/gtk/wx.cpp:2419: `wxEVT_MOUSEWHEEL' undeclared (first use this

function)

src/gtk/wx.cpp:2500: `wxEVT_HELP' undeclared (first use this function)
src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
function)

These errors indicate that you are building wxPython 2.3.x with wxGTK 2.2.x,
they need to be the same. You said above that you built wxGTK 2.3.1, if you
did then you must not have installed it, or there is a conflict in some
other way with wxGTK 2.2.x

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

Robin you don't have to read this, I'm just posting it for others who may run
into similar problems.

<snip > <see previous message on this topic>

> src/gtk/wx.cpp:2501: `wxEVT_DETAILED_HELP' undeclared (first use this
> function)

These errors indicate that you are building wxPython 2.3.x with wxGTK
2.2.x, they need to be the same. You said above that you built wxGTK
2.3.1, if you did then you must not have installed it, or there is a
conflict in some other way with wxGTK 2.2.x

Ok . Thanks Robin.

As Robin suspected, wxGTK-2.2.x was hiding in /usr/local/* from an earlier
build. I probably built the 2.2.x without specifying a prefix so it
defaulted to /usr/local. (Since that earlier build I've been using --prefix
/usr for all my builds and this works fine for wxGTK and wxPython. )

wxPython did not seem to mind that wxGTK is in /usr and Python 2.1 is in
/usr/local although that might not be good practice. I put it there to
prevent interference with Python 1.5 which will probably cause me problems
later but I'll burn the Python 1.5 bridge when I come to it.

Anyway, I got rid of all those wxGTK-2.2.x files in various directories
under /usr/local and wxPython proceeded to build and install nicely.

-Pat Callahan

···

On Thursday 20 September 2001 09:46, you wrote: