‘mutex’ in namespace ‘std’ does not name a type

在Windows的vs中使用std::mutex没有问题,将代码迁移到ubuntu上后报错:‘mutex’ in namespace ‘std’ does not name a type

解决方法:加上头文件

#include <thread>
#include <mutex>
#include <unistd.h>
原文地址:https://www.cnblogs.com/maycpou/p/13936947.html