由於Mingw下沒有帶pthread庫,所以在eclipse中設置多線程動態鏈接庫,也不管用。需要自己下載,
ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.exe
解開pthreads-w32-2-8-0-release.exe,把Pre- built.2中的libpthreadGC2.a改名為libpthread.a復制到c:\mingw\lib目錄,
pthread.h復制到c: \mingw\include目錄即可。
原文:http://bbs.csdn.net/topics/392011726?page=1