在linux上编译C语言,遇见如下问题如何解决

/tmp/cc6U8kGg.o:在函数‘main’中:

mthreadserver.c:(.text+0x179):对‘pthread_create’未定义的引用

collect2: error: ld returned 1 exit status


qq_莫非
浏览 3435回答 3
3回答

望远

没有导入头文件吗?#include<pthread.h>

第7段材料

主函数main中pthread_create未定义
打开App,查看更多内容
随时随地看视频慕课网APP