eclipse 无法在 Windows 中包含 pthread.h
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13022381/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Not able to include pthread.h in Windows
提问by SB26
Possible Duplicate:
Can I get C's pthread.h to compile in Windows?
I am using eclipse on Windows 7.I am trying multi threaded programming in C.But I am not able to include pthread.h.It says No such file or directory.It worked on another Windows 7 machine but does not seem to work on this one.Please help me out.
我在 Windows 7 上使用 eclipse。我正在尝试在 C 中进行多线程编程。但我无法包含 pthread.h。它说没有这样的文件或目录。它在另一台 Windows 7 机器上工作,但似乎没有工作这个。请帮帮我。
回答by Nikos C.
pthreads, also known as POSIX threads, are a facility of POSIX-conformant operating systems (usually Unix-like systems, such as Linux and Mac OS X.) Windows does not have it. You will need to install a Windows port of pthreads. You can get it here: http://sources.redhat.com/pthreads-win32
pthread,也称为 POSIX 线程,是符合 POSIX 的操作系统(通常是类 Unix 系统,例如 Linux 和 Mac OS X)的一种工具。Windows 没有它。您将需要安装 pthreads 的 Windows 端口。你可以在这里得到它:http: //sources.redhat.com/pthreads-win32