pthread下载地址:https://sourceware.org/pthreads-win32/
1. 项目->属性->VC++目录
包含目录里添加:pthread所在路径pthreadPre-built.2include
库目录里添加:pthread所在路径pthreadPre-built.2libx86
2.项目->属性->调试
环境里添加:pthread所在路径pthreadPre-built.2libx86
3.源文件中:
#include<pthread.h>
#pragma comment(lib, "pthreadVC2.lib")
4.将pthreadVC2.dll动态链接库放到项目可执行文件同一路径下。