当包含< filesystem>时,MinGW-w64 8.1.0 rev 0无法编译. [英] MinGW-w64 8.1.0 rev 0 doesn't compile when including <filesystem>

查看:590
本文介绍了当包含< filesystem>时,MinGW-w64 8.1.0 rev 0无法编译.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

2天前,我很高兴地注意到MinGW-w64发布了其gcc 8.1.0,修订版0.不幸的是,这是一个简单的程序

2 days ago, I was excited to note that MinGW-w64 released its gcc 8.1.0, revision 0. Unfortunately, a simple program

#include <filesystem>
int main() {}

不编译.从

开始,这会导致<filesystem>内部出现许多错误.

does not compile. It results in a bunch of errors inside <filesystem>, starting with

C:/MinGW/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)':
C:/MinGW/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path')
|| (__p.has_root_name() && __p.root_name() != root_name()))
                           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

这是谁的罪魁祸首?或更妙的是,该错误要报告给谁?

Who's to blame for that? Or better, to whom is that error to report?

推荐答案

此问题可能是由于gcc发行版(mingw-w64)或编译器本身(gcc)造成的.

This problem could be due to the gcc distribution (mingw-w64) or to the compiler itself (gcc).

首先,更可能的假设是我认为这可能是分布问题,所以我刚刚将其作为错误添加到mingw-w64的sourceforge网站上.

As first, more likely hypothesis I think it could be an issue of the distribution, so I have just added it as a bug to the sourceforge website of mingw-w64.

https://sourceforge.net/p/mingw-w64/bugs/737 /

如果他们发现这是gcc的问题,则可以将其重新定位到编译器网站(gcc.gnu.org).

If they find that's a problem of gcc, this could be readdressed to the compiler website (gcc.gnu.org).

让我们拭目以待,看看他们在sourceforge上回答了什么.

Let's wait and see what they answer on sourceforge.

马可

这篇关于当包含&lt; filesystem&gt;时,MinGW-w64 8.1.0 rev 0无法编译.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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