安装WinGW后,我正在尝试实施用户this example实施的Slimane。
每当我python setup.py build_ext --inplace
时,都会产生以下错误:
running build_ext
building 'test' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Users\Orbit\RPOSS\include -
IC:\Users\Orbit\AppData\Local\Programs\Python\Python35-32\include -
IC:\Users\Orbit\AppData\Local\Programs\Python\Python35-32\include -c test.c
-o build\temp.win32-3.5\Release\test.o -fopenmp
In file included from C:\Users\Orbit\AppData\Local\Programs\Python\Python35-
32\include/Python.h:65:0,
from test.c:23:
C:\Users\Orbit\AppData\Local\Programs\Python\Python35-
32\include/pytime.h:112:12: warning: 'struct timeval' declared inside
parameter list will not be visible outside of this definition or declaration
struct timeval *tv,
^~~~~~~
C:\Users\Orbit\AppData\Local\Programs\Python\Python35-
32\include/pytime.h:117:12: warning: 'struct timeval' declared inside
parameter list will not be visible outside of this definition or declaration
struct timeval *tv,
^~~~~~~
writing build\temp.win32-3.5\Release\test.cp35-win32.def
C:\MinGW\bin\gcc.exe -shared -s build\temp.win32-3.5\Release\test.o
build\temp.win32-3.5\Release\test.cp35-win32.def -LC:\Users\Orbit\RPOSS\libs
-LC:\Users\Orbit\AppData\Local\Programs\Python\Python35-32\libs -
LC:\Users\Orbit\AppData\Local\Programs\Python\Python35-32 -
LC:\Users\Orbit\RPOSS\PCbuild\win32 -lpython35 -lvcruntime140 -o
C:\Users\Orbit\RPOSS\pre-test\test.cp35-win32.pyd -fopenmp
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot
find -lpthread
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1
我用相同的错误标题查了同样的问题,但没有帮助我,是否有人可以解决这个问题?