1 pthread下载地址:ftp://sourceware.org/pub/pthreads-win32
2 mingw使用pthread步骤(静态链接pthread而不需要dll):
a)编译pthread,进入pthreads.2目录下,输入make clean GC-static命令,在当前目录下生产libpthreadGC2.a
b)复制Pre-built.2\include下.h文件到mingw\include目录下,复制libpthreadGC2.a到mingw\lib下并改名为libpthread
c)源程序编写,引用pthread......
d)编译源程序时加上-DPTW32_STATIC_LIB编译选项
e)链接程序时加上 -lpthread