错误:名称空间'std'中的'thread'未命名类型

时间:2017-08-05 15:29:01

标签: c++ multithreading codeblocks precompiling

我的编译错误

Picture Of The Error

我尝试通过下载和安装gcc-tdm来修复它,因为论坛提到这是一个编译器问题,但我仍然得到相同的结果。

有谁知道如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

仅在今天早上解决了这个问题。经过一番阅读后,我意识到我已经安装了带有Win32线程的MinGW。带有posix线程的MinGW的全新清洁安装

https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

问题得到解决。

链接到原始Win32 vs pthread帖子:mingw-w64 threads: posix vs win32

答案 1 :(得分:-1)

代码块附带的GCC有些陈旧。你需要更新它。我建议使用class YouForm(FlaskForm): name = StringField('Name :', description = "enter your name", validators=[InputRequired(message='please enter your name')]) def validate(self): valid = True if not self.name.data: self.name.errors.append('* Either file or text is required') valid = False return valid ,它是那里最好的Windows GCC端口之一。

相关问题