英文:
What MinGW version has std::condition_variable_any, std::thread and std::mutex on Windows?
问题
My MinGW version on my Windows machine that does not have std::condition_variable_any, std::thread and std::mutex so I am getting the following compiler errors:
错误:'std' 命名空间中的 'condition_variable_any' 不是类型
错误:'mutex' 不是 'std' 的成员
I did a quick search and found this page https://github.com/niXman/mingw-builds-binaries/releases where multiple versions are available for Windows. What of them have std::condition_variable_any, std::thread and std::mutex? And what is the key difference between these versions?
英文:
My MinGW version on my Windows machine that does not have std::condition_variable_any, std::thread and std::mutex so I am getting the following compiler errors:
error: 'condition_variable_any' in namespace 'std' does not name a type
error: 'mutex' is not a member of 'std'
I did a quick search and found this page https://github.com/niXman/mingw-builds-binaries/releases where multiple versions are available for Windows. What of them have std::condition_variable_any, std::thread and std::mutex? And what is the key difference between these versions?
答案1
得分: 1
选择POSIX线程构建的GCC/MinGW-w64以获得最佳可移植性。
来自https://winlibs.com/的构建通常使用POSIX线程构建,尽管GCC 13也提供了MCF线程构建,这些构建更接近本机Windows线程,可能也适合您使用。
英文:
For best portability choose POSIX threads builds of GCC/MinGW-w64.
The builds from https://winlibs.com/ are usually built with POSIX threads, though GCC 13 also has MCF thread builds available, which are closer to native Windows threads and may also work for you.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论