0

after installing WinGW, i am trying to implement this example that user Slimane implemented.

and whenever i do python setup.py build_ext --inplace, it produces the following error:

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 

I went over same questions with the same error title but non helped me, can anybody relate to this issue?

  • The important error is "cannot find -lpthread" – DavidW Mar 20 '18 at 20:14
  • please, do you know how to fix this"cannot find -lpthread"? –  Mar 20 '18 at 20:18
  • I mention it because it's the more useful error to search for. Hopefully the question I've linked should tell you, but I don't use MinGW myself, so can't test it – DavidW Mar 20 '18 at 20:19
  • downloading the packages provided in [Eclipse MinGW C++ cannot find -lpthread](https://stackoverflow.com/questions/39185248/eclipse-mingw-c-cannot-find-lpthread), hopefully it is what i am looking for. thanks –  Mar 20 '18 at 20:22

0 Answers0