如何在windows上设置pthreads? [英] How to set up pthreads on windows?

查看:76
本文介绍了如何在windows上设置pthreads?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 这里 上找到了 pthreads 的实现,但我找不到正确工作.有人可以帮我安装 pthreads 吗?喜欢把 DLL、.lib 和 .h 文件放在哪里?

I found an implementation for pthreads on Windows here, but I couldn't get it to work right. Can anyone help me to install pthreads ? Like where to put DLLs, .lib, and .h files?

此外,作为环境,我没有使用 Visual Studio,而是使用带有 Mingw 的代码块.

Also, as an environment I'm not using Visual Studio, but Codeblocks with Mingw.

我通常在 Linux 上开发,但这个项目必须在 Windows 上,而且我已经使用 pthreads 实现了一些代码,所以我不想使用来自 'windows.h' 的 Windows 线程.

I usually develop on Linux, but this project has to be on Windows, and I've already got some code implemented using pthreads, so I don't want to use Windows Threads from 'windows.h'.

推荐答案

.dll 可以放在 PATH 环境中列出的任何目录中变量.

The .dll can go in any directory listed in your PATH environment variable.

.lib 文件可以放在 LIB 环境中列出的任何目录中变量.

The .lib file can go in any directory listed in your LIB environment variable.

.h 文件可以放在 INCLUDE 中列出的任何目录中环境变量.

The .h files can go in any directory listed in your INCLUDE environment variable.

另请参阅您分享的链接的常见问题解答页面.

Also see the FAQs page of the link you shared .

阅读 Q6、Q7、Q8.

Read Q6, Q7, Q8.

这篇关于如何在windows上设置pthreads?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆