VS2017:E0135名称空间"std"没有成员“文件系统" [英] VS2017: E0135 namespace "std" has no member "filesystem"
问题描述
为了使用C ++ 17库中的std :: filesystem,我的项目从vs2015迁移到了vs2017.
In order to use: std::filesystem from the C++17 library, my project was migrated from vs2015 to vs2017.
我的项目编译并运行没有错误,包含了lib也没有错误,但是当尝试使用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
推荐答案
有两个可供研究的选择.
A couple of options to investigate.
- 检查语言标准.您需要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 trystd::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屋!