且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Windows 10(使用g ++作为编译器)在C ++中使用线程的问题

更新时间:2023-11-11 15:46:40

对于其他处理此问题的人:最简单的解决方案是下载

For anyone else dealing with this problem: The simplest solution is to download mingw-64 and use their compiler instead.

然后使用-std=gnu++11-std=c++11参数启用对ISO C ++ 2011标准的支持以及对线程的扩展支持(请注意:该支持目前处于试验阶段,尽管到目前为止还没有给我带来任何问题)

Then use the -std=gnu++11 or -std=c++11 arguments to enable support for the ISO C++ 2011 standard and by extension support for threads (do note: This support is currently experimental, though that has not given me any problems so far).