问题描述
我正在尝试使用pthread API编写一些并发程序。
$ b $我下载了eclipse IDE for C / C ++ Developers,MinGW。我把所有的库,头文件放到MinGW文件的相应位置。
当我尝试构建项目时总是有一个错误找不到 - lpthread,怎么了?
我已将-pthread添加到GCC编译器。
我在Google中搜索了很多,但似乎没有人像我这样有类似的问题。 / p>
的人谁也缺少MinGW pthread库应该帮助你!本质上,MinGW安装程序脚本在安装时可能无法下载lpthread库。引用链接:
I am new to C programming.
I was trying to use the pthread API to write some concurrent program.
I downloaded eclipse IDE for C/C++ Developers, MinGW. I have put all the library, header files into the corresponding location of the MinGW file.
When I tried to build the project, there is always an error "cannot find -lpthread", what happened?I have added the "-pthread" to the GCC compiler.
I have searched a lot in Google but seems no one have similar problem as me.
The answer to this question by someone who is also missing MinGW pthread library should help you out! Essentially the issue is that the MinGW installer script might not download the lpthread library upon installation. Quoted from link:
这篇关于找不到-lpthread?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!