Hi,
After looking at how pthreads is compiled under MXE/MinGW, I'm starting to
doubt the generated DLL is actually valid. The way it works is that it
compiles a static version of libpthreads.a, then it generates the DLL using
the script make-shared-from-static.
The static library is compiled using the target GC-static, and if you look
into [1], you can see that it defines PTW32_STATIC_LIB. Now it you look
into [2], you can see that the whole body of dll.c is ignored. In other
words, I think the DLL initialization routine (DllMain) is missing in the
generated DLL; hence the pthreads DLL is invalid.
Michael.
[1]
ftp://sourceware.org/pub/pthreads-win32/sources/pthreads-w32-2-9-1-release/GNUmakefile
[2]
ftp://sourceware.org/pub/pthreads-win32/sources/pthreads-w32-2-9-1-release/dll.c
After looking at how pthreads is compiled under MXE/MinGW, I'm starting to
doubt the generated DLL is actually valid. The way it works is that it
compiles a static version of libpthreads.a, then it generates the DLL using
the script make-shared-from-static.
The static library is compiled using the target GC-static, and if you look
into [1], you can see that it defines PTW32_STATIC_LIB. Now it you look
into [2], you can see that the whole body of dll.c is ignored. In other
words, I think the DLL initialization routine (DllMain) is missing in the
generated DLL; hence the pthreads DLL is invalid.
Michael.
[1]
ftp://sourceware.org/pub/pthreads-win32/sources/pthreads-w32-2-9-1-release/GNUmakefile
[2]
ftp://sourceware.org/pub/pthreads-win32/sources/pthreads-w32-2-9-1-release/dll.c