在包含pthread.h头文件后,还是报错未定义的引用
/tmp/cc6zqi5F.o:在函数‘main’中:
minihttp.c:(.text+0x17e):对‘pthread_create’未定义的引用
collect2: error: ld returned 1 exit status
需要在编译时候添加编译选项-phread选项
gcc a.c -pthread -o a.exe
在包含pthread.h头文件后,还是报错未定义的引用
/tmp/cc6zqi5F.o:在函数‘main’中:
minihttp.c:(.text+0x17e):对‘pthread_create’未定义的引用
collect2: error: ld returned 1 exit status
需要在编译时候添加编译选项-phread选项
gcc a.c -pthread -o a.exe