-lpthread和-pthread的区别

在编译多线程程序时遇到了  undefined reference to `pthread_create'

 

 在网上找了很多都说加上编译开关-lpthread,然而并没有用,一句话,我们现在应该使用 -pthread 而不是 -lpthread。

参考文章:https://blog.csdn.net/jiangxinyu/article/details/7778864

posted on 2021-06-06 17:35  机器猫007  阅读(164)  评论(0)    收藏  举报

导航