![](/img/trans.png)
[英]Having undefined reference to `pthread_join' error even using lpthread
[英]Undefined Reference to `pthread_init' When Using -lpthread Flag:
我正在编译使用:
gcc -o outfile infile.c -lpthread
唯一未定义的引用是pthread_init
。
我已尝试使用-pthread
而不是-lpthread
,根据网上的一些建议。
我包括<pthread.h>
有任何想法吗?
不要调用pthread_init()
。 在Linux上没有必要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.