SWIG, MinGW, and Python 2.3 problem

Phil Schmidt phil_nospam_schmidt at yahoo.com
Wed Sep 10 19:52:07 CEST 2003

I'm attempting to follow the instructions at
http://sebsauvage.net/python/mingw.html, without luck.

I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19.

I get an export error on "initexample" when attempting the example. Do
I need some extra switches to get SWIG to create that function? Or is
it something else?

Here's my example build:

C:\Phil\python\Extensions\example>python setup.py build
running build
running build_ext
building 'example' extension
swigging example.i to example_wrap.c
C:\Phil\python\Extensions\SWIG-1.3.19\swig.exe -python -o
example_wrap.c example.i
creating build
creating build\temp.win32-2.3
creating build\temp.win32-2.3\Release
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\python23\include
-Ic:\python23\PC -c example.c -o
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\python23\include
-Ic:\python23\PC -c example_wrap.c -o
example_wrap.c:170: warning: `SWIG_TypeDynamicCast' defined but not
example_wrap.c:182: warning: `SWIG_TypeName' defined but not used
example_wrap.c:188: warning: `SWIG_TypeQuery' defined but not used
example_wrap.c:423: warning: `SWIG_ConvertPtr' defined but not used
example_wrap.c:515: warning: `SWIG_ConvertPacked' defined but not used
writing build\temp.win32-2.3\Release\example.def
creating build\lib.win32-2.3
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s
build\temp.win32-2.3\Release\example.o build\temp.win32-2.3\Re
lease\example.def -Lc:\python23\libs -Lc:\python23\PCBuild -lpython23
-o build\lib.win32-2.3\example.pyd
Cannot export initexample: symbol not defined
error: command 'gcc' failed with exit status 1

More information about the Python-list mailing list