[Distutils] errors building with mingw32

Moore, Paul Paul.Moore at atosorigin.com
Wed Oct 1 04:15:01 EDT 2003


From: Jonathan Taylor [mailto:jonathan.taylor at stanford.edu]
> and the error messages:

> F:\Python Example>python setup.py build -c mingw32
> running build
> running build_ext
> building 'foo' extension
> writing build\temp.win32-2.3\Release\foo.def
> F:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.3\Release\foo.o b
> uild\temp.win32-2.3\Release\foo.def -LF:\Python23\libs -LF:\Python23\PCBuild -lp
> ython23 -o build\lib.win32-2.3\foo.pyd
> build\temp.win32-2.3\Release\foo.o(.text+0x94):foo.c: undefined reference to `_i
> mp__PyExc_TypeError'
> build\temp.win32-2.3\Release\foo.o(.text+0xc1):foo.c: undefined reference to `_i
> mp___Py_NoneStruct'
> error: command 'gcc' failed with exit status 1
>
> Any help would be greatly appreciated.

You need to build a libpython23.a library (it's not supplied with Python). See
section 6.2.2 of "Installing Python Modules" in the Python documentation, it gives
all the steps you need.

Hope this helps,
Paul.



More information about the Distutils-SIG mailing list