[Distutils] SWIG+distutils+Windows???

Michel Van den Bergh michel.vandenbergh@luc.ac.be
Mon Jan 1 21:06:04 2001


Hi I am trying to generate an extension module using distutils on
windows.
I am using the plain vanilla command

python setup.py build_ext -ccygwin

(the corresponding command without the -ccygwin works fine on Linux).

The source for the extension module was generated by SWIG on Linux (as I
don't have
SWIG on windows).

Compiling seems to go fine but then I get a bunch of undefined symbols:

Cannot export init_hintmodule: symbol not defined
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0x165):hint_wrap.c:
undefined reference to `_imp__PyExc_NameError'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0x1f1):hint_wrap.c:
undefined reference to `_imp__PyExc_NameError'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0x230):hint_wrap.c:
undefined reference to `_imp__PyType_Type'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0x9e2):hint_wrap.c:
undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0x9e9):hint_wrap.c:
undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0xa22):hint_wrap.c:
undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0xa29):hint_wrap.c:
undefined reference to `_imp___Py_NoneStruct'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0xa99):hint_wrap.c:
undefined reference to `_imp__PyExc_TypeError'
build\temp.win32-2.0\Release\gtlevel\src\hint_wrap.o(.text+0xb3d):hint_wrap.c:
undefined reference to `_imp__PyExc_TypeError'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I have no idea what the problem is here. Is there anybody than can help?
I suspect this must be trivial for a knowledgeable person.

The version numbers are as follows:
gcc 2.95.2
ld 2.10.90
dllwrap 2.10.90

Best regards.
Michel
======================================
Linux: the choice of a GNU generation.