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

posted @ 2016-09-01 01:37  四时木  阅读(4595)  评论(0编辑  收藏  举报