问题描述:
ubuntu 16.04 下 C语言开发环境,
已经添加了头文件#include <pthread.h> 以及在Makefile中添加了 -lpthread,但是编译时仍然报错:
undefined reference to `pthread_create'
百度后得知,ubuntu下-lpthread必须跟在 gcc命令的最后才行。