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

解决方法:加上头文件

#include <thread>
#include <mutex>
#include <unistd.h>

相关文章:

  • 2022-12-23
  • 2022-02-06
  • 2021-06-20
  • 2021-06-03
  • 2022-12-23
  • 2021-04-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-04-28
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案