Error on Build of wxPython

I’m trying to build and setup wxPython, and at step 9 of the wiki
instructions (http://gnuradio.org/trac/wiki/wxPythonCygwin) I get a g++
error, as apparently a library isn’t linking.

Some background: I’m installing on Cygwin on Windows XP, and have
followed the instructions to use binutils 20080523-1.

(the first line is the command)

$ python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS
=0 BUILD_GIZMOS=0 UNICODE=0
WARNING: WXWIN not set in environment. Assuming ‘…’
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=msw --unicode=no --version=2.8
Preparing CORE…
Preparing STC…
running build_ext
building ‘controls’ extension
writing build/temp.cygwin-1.5.25-i686-2.5/src/msw/controls.def
g++ -mcygwin -shared -s
build/temp.cygwin-1.5.25-i686-2.5/src/msw/controls_wrap
.o build/temp.cygwin-1.5.25-i686-2.5/src/msw/controls.def
-L/usr/local/lib -L/
usr/lib/python2.5/config -lwx_msw_richtext-2.8 -lwx_msw_aui-2.8
-lwx_msw_xrc-2.8
-lwx_msw_qa-2.8 -lwx_msw_html-2.8 -lwx_msw_adv-2.8 -lwx_msw_core-2.8
-lwx_base

xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8 -lpython2.5 -o wx/controls.dll
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(.
text+0xcddf8): undefined reference to
__imp___ZTV23wxDatePickerCtrlGeneric' build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(. text+0xcde03): undefined reference to __imp___ZN23wxDatePickerCtrlGeneric4InitE
v’
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(.
text+0xcde6e): undefined reference to
__imp___ZN23wxDatePickerCtrlGeneric6Creat eEP8wxWindowiRK10wxDateTimeRK7wxPointRK6wxSizelRK11wxValidatorRK8wxString' build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(. text+0xce7fd): undefined reference to __imp___ZTV23wxDatePickerCtrlGeneric’
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(.
$
v’
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(.
text+0xced2d): undefined reference to
`__imp___ZN23wxDatePickerCtrlGeneric6Creat
eEP8wxWindowiRK10wxDateTimeRK7wxPointRK6wxSizelRK11wxValidatorRK8wxString’
collect2: ld returned 1 exit status
error: command ‘g++’ failed with exit status 1

Any help?

Mark Petzold
[email protected]

Mark Petzold wrote:

I’m trying to build and setup wxPython, and at step 9 of the wiki
instructions > (http://gnuradio.org/trac/wiki/wxPythonCygwin) I get a g++
error, as apparently > a library isn’t linking.

Some background: I’m installing on Cygwin on Windows XP, and have
followed the instructions to use binutils 20080523-1.

$ python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS=0 BUILD_GIZMOS=0 UNICODE=0
[…]
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_controls_wrap.o:_controls_wrap.cpp:(.text+0xcddf8):
undefined reference to `__imp___ZTV23wxDatePickerCtrlGeneric’
[etc.]

Once again, it appears that a change in the wxPython release has broken
the
Cygwin build. I don’t know how it is supposed to work, but I made it
work
by doing the following:

After running …/configure, find the file
build-local/lib/wx/include/msw-ansi-release-2.8/wx/setup.h and after the
line:

#define wxUSE_DATEPICKCTRL 1

add another line:

#define wxUSE_DATEPICKCTRL_GENERIC 1

then continue with the directions in the wiki.

– Don W.

Don,
I’m glad people smarter about these things than me are ready to help.
That did the trick. It seems to be installed properly now.

Mark