VS2017:E0135 命名空间“std";没有成员“文件系统"; [英] VS2017: E0135 namespace "std" has no member "filesystem"

查看:24
本文介绍了VS2017:E0135 命名空间“std";没有成员“文件系统";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了使用:std::filesystem 来自 C++17 库,我的项目从 vs2015 迁移到 vs2017.

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

我的项目编译和运行没有错误,包含的库没有错误,但是当尝试使用 std::filesystem 时,我得到以下信息:

My project compiles and runs without error, the lib is included without error, but when trying to use std::filesystem I get the following:

似乎没有包含该库,但看不出为什么?

It seems the library is not being included but cant see why not?

Microsoft Visual Studio Enterprise 2017
VisualStudio.15.Release/15.7.3+27703.2026
Visual C++ 2017   00369-90000-00000-AA466
Microsoft Visual C++ 2017

推荐答案

几个可供调查的选项.

  • 检查语言标准.您需要 C++17 或更高版本:
  • 如果你的 Visual Studio 版本还不支持 std::filesystem,你可以试试 std::experimental::filesystem.
  • 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.

我有以下版本并且 std::filesystem 可以工作(上面显示的 C++17 语言选择):

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

这篇关于VS2017:E0135 命名空间“std";没有成员“文件系统";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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