By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,353 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,353 IT Pros & Developers. It's quick & easy.

SWIG, MinGW, and Python 2.3 problem

P: n/a
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
--compiler=mingw32
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
build\temp.win32-2.3\Release\example.o
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\python23\include
-Ic:\python23\PC -c example_wrap.c -o
build\temp.win32-2.3\Release\example_wrap.
o
example_wrap.c:170: warning: `SWIG_TypeDynamicCast' defined but not
used
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_wrap.o
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
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.