Windows下安裝MinGW,編譯c/c++時出現cannot find -lpthread解決辦法

因爲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多線程

相關文章
相關標籤/搜索