"undefined reference to `pthread_xxx'"

来源:互联网 发布:上瘾网络剧类似的 编辑:程序博客网 时间:2024/06/15 23:48

解决办法:

在编译中要加 -lpthread参数
    gcc test.c -o test -lpthread