Almost got it

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Tue Jul 23 03:19:24 EDT 2002


Thank you all for your help.

It almost works -- the source files get compiled and everything seems to 
be fine, up to the linking stage where two references 
(__imp___Py_NoneStruct and __imp__PyCObject_Type) are unresolved.  These 
two are (I think) in python22.lib, which gcc seems to find, but somehow 
it can't find those two routines in it.

I also tried to link them as

c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -static --entry 
_DllMain at 12 -s
  build\temp.win32-2.2\Release\cluster.o 
build\temp.win32-2.2\Release\clustermodule.o 
build\temp.win32-2.2\Release\ranlib.o build\temp.win32-2.2\Release\com.o 
build\temp.win32-2.2\Release\linpack.o 
build\temp.win32-2.2\Release\cluster.def
c:\python22\libs\python22.lib -o 
build\lib.win32-2.2\Pycluster\cluster.pyd -s

to make sure it finds python22.lib, but with the same result.
Any ideas? Sorry to bother you guys again.


C:\cygwin\home\mdehoon\Software\Cluster>c:\\python22\\python setup.py 
build --compiler=mingw32
running build
running build_py
creating build
creating build\lib.win32-2.2
creating build\lib.win32-2.2\Pycluster
copying Pycluster\__init__.py -> build\lib.win32-2.2\Pycluster
running build_ext
building 'Pycluster.cluster' extension
creating build\temp.win32-2.2
creating build\temp.win32-2.2\Release
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iranlib/src 
-Ic:\python22\include -c cluster.c -o build\temp.win32-2.2\Release\cluster.o
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iranlib/src 
-Ic:\python22\include -c clustermodule.c -o 
build\temp.win32-2.2\Release\clustermodule.o

clustermodule.c:51: warning: `set_transposed_strides' defined but not used
clustermodule.c:188: warning: `do_array_inout' defined but not used
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iranlib/src 
-Ic:\python22\include -c ranlib/src/ranlib.c -o 
build\temp.win32-2.2\Release\ranlib.o
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iranlib/src 
-Ic:\python22\include -c ranlib/src/com.c -o 
build\temp.win32-2.2\Release\com.o
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iranlib/src 
-Ic:\python22\include -c ranlib/linpack/linpack.c -o 
build\temp.win32-2.2\Release\linpack.o
writing build\temp.win32-2.2\Release\cluster.def
c:\cygwin\usr\local\bin\gcc.exe -mno-cygwin -mdll -static --entry 
_DllMain at 12 -s
  build\temp.win32-2.2\Release\cluster.o 
build\temp.win32-2.2\Release\clustermodule.o 
build\temp.win32-2.2\Release\ranlib.o build\temp.win32-2.2\Release\com.o 
build\temp.win32-2.2\Release\linpack.o 
build\temp.win32-2.2\Release\cluster.def -L
c:\python22\libs -lpython22 -o build\lib.win32-2.2\Pycluster\cluster.pyd 
-s 
build\temp.win32-2.2\Release\clustermodule.o(.text+0x74):clustermodule.c: 
undefined reference to `__imp___Py_NoneStruct'
build\temp.win32-2.2\Release\clustermodule.o(.text+0x7c):clustermodule.c: 
undefined reference to `__imp___Py_NoneStruct'
build\temp.win32-2.2\Release\clustermodule.o(.text+0x28da):clustermodule.c: 
undefined reference to `__imp__PyCObject_Type'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Delaney, Timothy wrote:

>>From: Delaney, Timothy [mailto:tdelaney at avaya.com]
>>
>>python setup.py build --compiler-mingw32
>>
> 
> python setup.py build --compiler=mingw32
> 
> Tim Delaney
> 
> 
> 




More information about the Python-list mailing list