Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Multithreading 我怎样才能包括<;pthread.h>;windows,链接器选项?_Multithreading_Gcc - Fatal编程技术网

Multithreading 我怎样才能包括<;pthread.h>;windows,链接器选项?

Multithreading 我怎样才能包括<;pthread.h>;windows,链接器选项?,multithreading,gcc,Multithreading,Gcc,如何在windows上包含pthread.h?我尝试使用-lpthread进行编译,但不起作用。 我使用的是GCC编译器。谢谢大家。拥有GCC是不够的,因为pthreads是POSIX平台的一部分,而Windows不是。您必须尝试使用Windows线程API,下载Windows的pthread库,或在POSIX环境(Cygwin,MinGW)中编译。谢谢,您推荐什么windiws API?当我在谷歌上搜索“Windows线程”时,第一个链接似乎让我走上了一条很好的轨道。下一票。@hicaemic

如何在windows上包含
pthread.h
?我尝试使用
-lpthread
进行编译,但不起作用。
我使用的是
GCC编译器
。谢谢大家。

拥有GCC是不够的,因为pthreads是POSIX平台的一部分,而Windows不是。您必须尝试使用Windows线程API,下载Windows的pthread库,或在POSIX环境(Cygwin,MinGW)中编译。

谢谢,您推荐什么windiws API?当我在谷歌上搜索“Windows线程”时,第一个链接似乎让我走上了一条很好的轨道。下一票。@hicaemic我不在乎你的下一票,这在这个网站上很正常,只有下一票,我必须注册evry times的新帐户。我喜欢像你这样的仇恨者。。