VS2017: E0135 namespace “std” has no member “filesystem”

前端 未结 1 830
温柔的废话
温柔的废话 2020-12-29 18:46

In order to use: std::filesystem from the C++17 library, my project was migrated from vs2015 to vs2017.

My project compiles and runs without error, the lib is includ

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

    A couple of options to investigate.

    • Check the language standard. You need C++17 or above:
    • If your version of visual studio doesn't support std::filesystem yet, you can try std::experimental::filesystem.

    I have the following version and std::filesystem works (with the C++17 language selection shown above):

    Microsoft Visual Studio Community 2017 Preview
    Version 15.8.0 Preview 1.1
    VisualStudio.15.Preview/15.8.0-pre.1.1+27705.2000
    
    0 讨论(0)
提交回复
热议问题