pthread下载地址:https://sourceware.org/pthreads-win32/

1. 项目->属性->VC++目录

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

包含目录里添加:pthread所在路径\pthread\Pre-built.2\include

库目录里添加:pthread所在路径\pthread\Pre-built.2\lib\x86

2.项目->属性->调试

环境里添加:pthread所在路径\pthread\Pre-built.2\lib\x86

3.源文件中:

#include<pthread.h>
#pragma comment(lib, "pthreadVC2.lib")

4.将pthreadVC2.dll动态链接库放到项目可执行文件同一路径下。

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄