Compilation errors for C++17 on MinGW

后端 未结 1 855
南旧
南旧 2020-12-20 22:41

I want to play around with the new filesystem library that\'s now apart of the C++17 standard, however I can\'t get things to compile.

Things I\'ve alre

相关标签:
1条回答
  • 2020-12-20 23:19

    The issue is with the mingw and gcc/g++ 8 branch itself, not with the compiler flags or pre-processor directives. The bug is open here .

    Try using stable mingw-w64-7.x releases with #include <experimental/filesystem> directive and -lstdc++fs -std=c++17 flags. This will work for now, or otherwise wait for v9.1.0.

    On experimental channel you need to use std::experimental::filesystem instead of std::filesystem.

    0 讨论(0)
提交回复
热议问题