How to Build and Install wxPython for Microsoft Windows under Cygwin?

Hi,

I followed your instructions on
http://www.gnuradio.org/trac/wiki/wxPythonCygwin
but I failed when I got to step (9):

python setup.py build_ext --inplace WXPORT=msw COMPILER=cygwin
BUILD_GLCANVAS=0 BUILD_GIZMOS=0 UNICODE=0

The error message I got was undefined reference:

build/temp.cygwin-1.5.25-i686-2.5/src/msw/_misc_wrap.o:_misc_wrap.cpp:(.text+0x2df03):
undefined reference to `__imp___ZN11wxLogStderrC1EP9__sFILE64’

Below is a little more detail:

[[email protected] …wxPython-src-2.8.7.1/wxPython]$ /bin/python setup.py
build_ext --inplace WXPORT=msw COMPILER=cygwin BUILD_GLCANVAS=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…
Preparing GIZMOS…
running build_ext
building ‘misc’ extension
gcc -mcygwin -mdll -O -Wall -DSWIG_TYPE_TABLE=wxPython_table
-DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -DWXUSINGDLL
-D__WXMSW
_ -Iinclude -Isrc
-I/usr/local/lib/wx/include/msw-ansi-release-2.8
-I/usr/local/include/wx-2.8 -I/usr/include/python2.5 -c
src/msw/_misc_wrap.cpp -o
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_misc_wrap.o -O3
src/msw/_misc_wrap.cpp: In function PyObject* _wrap_GetElapsedTime(PyObject*, PyObject*, PyObject*)': src/msw/_misc_wrap.cpp:4963: warning:wxGetElapsedTime’ is deprecated
(declared at /usr/local/include/wx-2.8/wx/stopwatch.h:77)
src/msw/_misc_wrap.cpp:4963: warning: wxGetElapsedTime' is deprecated (declared at /usr/local/include/wx-2.8/wx/stopwatch.h:77) src/msw/_misc_wrap.cpp: In functionPyObject*
_wrap_StartTimer(PyObject*, PyObject*)’:
src/msw/_misc_wrap.cpp:5066: warning: wxStartTimer' is deprecated (declared at /usr/local/include/wx-2.8/wx/stopwatch.h:73) src/msw/_misc_wrap.cpp:5066: warning:wxStartTimer’ is deprecated
(declared at /usr/local/include/wx-2.8/wx/stopwatch.h:73)
src/msw/_misc_wrap.cpp: In function PyObject* _wrap_DateTime_SetToTheWeek(PyObject*, PyObject*, PyObject*)': src/msw/_misc_wrap.cpp:25328: warning:SetToTheWeek’ is deprecated
(declared at /usr/local/include/wx-2.8/wx/datetime.h:724)
src/msw/_misc_wrap.cpp: In function PyObject* _wrap_DateTime_GetWeek(PyObject*, PyObject*, PyObject*)': src/msw/_misc_wrap.cpp:25391: warning:GetWeek’ is deprecated (declared
at /usr/local/include/wx-2.8/wx/datetime.h:727)
writing build/temp.cygwin-1.5.25-i686-2.5/src/msw/misc.def
g++ -mcygwin -shared -s
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_misc_wrap.o
build/temp.cygwin-1.5.25-i686-2.5/src/msw/misc.def -L/usr/local/lib
-L. -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/misc.dll -mno-cygwin -mwindows
build/temp.cygwin-1.5.25-i686-2.5/src/msw/_misc_wrap.o:_misc_wrap.cpp:(.text+0x2df03):
undefined reference to `__imp___ZN11wxLogStderrC1EP9__sFILE64’
collect2: ld returned 1 exit status
error: command ‘g++’ failed with exit status 1

Does anyone know why I got this error?

Thanks,
Linh

Hi Linh,

undefined reference to `__imp___ZN11wxLogStderrC1EP9__sFILE64’
This should be defined in /usr/local/lib/libwx_base-2.8.dll.a. You can
verify that it is defined there with

strings /usr/local/lib/libwx_base-2.8.dll.a | fgrep ZN11wxLogStderrC1EP9

If it is not there, then you have a problem with an earlier step in the
installation.

– Don W.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs