gpt4 book ai didi

linux - 使用 -lpthread 标志 : 时未定义对 `pthread_init' 的引用

转载 作者:太空狗 更新时间:2023-10-29 11:05:28 27 4
gpt4 key购买 nike

我正在编译使用:

gcc -o outfile infile.c -lpthread

唯一 undefined reference 是pthread_init .

我试过使用 -pthread而不是 -lpthread ,根据网上的一些建议。

包括<pthread.h>

有什么想法吗?

最佳答案

不要调用 pthread_init()。在 Linux 上没有必要。

关于linux - 使用 -lpthread 标志 : 时未定义对 `pthread_init' 的引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10201743/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com