一、问题描述
ubuntu编译报错:‘mutex’ in namespace ‘std’ does not name a type
二、解决方法
缺少头文件导致的,需要增加头文件
#include <thread>
#include <mutex>
#include <unistd.h>
转载链接
[1] maycpou. ‘mutex’ in namespace ‘std’ does not name a type [EB/OL]. http://t.zoukankan.com/maycpou-p-13936947.html, 2020-11-06/2022-06-28.