linux - fatal error : pthread/pthread_impl. h : No such file or directory #include <pthread/pthread_impl. h>

标签 linux gcc terminal compiler-errors gnu

那些错误的句子我都编译看到了

/usr/local/include/c++/4.8.1/pthread.h:57:34: fatal error: 
pthread/pthread_impl.h: No such file or directory
#include <pthread/pthread_impl.h>

我独立找到了 pthread.h 和 pthread_impl.h 但是没有名为 pthread/pthread_impl.h 的头文件(另外我在编译路径中移动了 pthread.h 和 pthread_impl.h 但它犯了同样的错误)

我该怎么办...?

最佳答案

  • 您是否添加了 pthread 编译器标志? (-pthread)
  • 正确的包含文件是pthread.h

关于linux - fatal error : pthread/pthread_impl. h : No such file or directory #include <pthread/pthread_impl. h>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53381206/

相关文章:

php - 服务器崩溃可能会泄露php源代码?

c++ - GCC 原子 shared_ptr 实现

c++ - 定义命名空间的变体和 __visibility__ 的含义

bash - 在终端中根据括号或括号(仅限顶级)拆分文本文件

linux - shell脚本中的动态变量

从 C 调用期望文件

linux - 找到文件后如何复制

c - 如何在 C 中自动查找未使用的结构定义?

ruby-on-rails - 库未加载:/usr/local/opt/openssl/lib/libssl. 1.0.0.dylib(LoadError)

fonts - 如何在 cygwin mintty 中添加字体