问题描述:

ubuntu 16.04  下  C语言开发环境,

已经添加了头文件#include <pthread.h> 以及在Makefile中添加了 -lpthread,但是编译时仍然报错:

undefined reference to `pthread_create'

百度后得知,ubuntu下-lpthread必须跟在  gcc命令的最后才行。

相关文章:

  • 2022-12-23
  • 2022-01-12
  • 2021-08-14
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-05
  • 2021-08-04
  • 2021-08-19
  • 2022-01-29
  • 2022-12-23
  • 2022-01-08
相关资源
相似解决方案