对‘pthread_create’未定义的引用

在这里插入图片描述
对于使用#include<pthread.h>头文件,编译的时候要注意加上 -lpthread
在这里插入图片描述
gcc file.c -lpthread -o pthread


学无止境,你知道的越多,其实你不知道的越多!

原文地址:https://www.cnblogs.com/dataoblogs/p/14121979.html