0
\$\begingroup\$

I am trying to a simple thing, just like that, in a header file;

#include <filesystem>
#include <iostream>
 
namespace fs = std::filesystem;
 

And IntelliSense goes: namespace std has no member filesystem.

Okay no worries, it's an easy fix. Just set the C++ language standard in the propery pages...

Well, it turns out it isn't, it's not an option in Unreal VS project. Tried typing in search bar, View -> Property pages, but no luck.

Okay let's try doing the whole thing in a console project first.

Same message from IntelliSense as before.

Ok, no worries, I found this.

I found my settings under: Project > projectname Properties

And voila, the console app works.

Let's try it in the Unreal project.

Well, well... My options are limited here.

myueoptions

I had a look around in the project settings as well:

projectsettings

How do I get this filesystem header work with my project?

\$\endgroup\$
8
  • \$\begingroup\$ Googling "ue4 c++17" gives me several different results with varying degrees of success from users, none of which seem to suggest changing this from VS or UE4 settings. \$\endgroup\$
    – Tyyppi_77
    Jul 2 '20 at 10:56
  • \$\begingroup\$ What is it that you're trying to achieve in the end? It may be that there's no way to do this as you're trying to do it but Unreal may have a solution of its own that will work. \$\endgroup\$
    – Stephen
    Jul 2 '20 at 11:16
  • \$\begingroup\$ I am trying to load fbx files, and load the file structure tree into a string. Something like that: rosettacode.org/wiki/Walk_a_directory/Recursively#C.2B.2B Not sure if this is the "Unreal" way of handling files. \$\endgroup\$ Jul 2 '20 at 12:17
  • \$\begingroup\$ But for now, I would like to load/read files \$\endgroup\$ Jul 2 '20 at 12:20
  • 1
    \$\begingroup\$ My guess is that the downvotes are because your question doesn't show any attempt to implement the approaches Tyyppi_77 mentioned can be found with a search. Can you show us what happens when you try implementing these approaches? \$\endgroup\$
    – DMGregory
    Jul 2 '20 at 13:10
2
\$\begingroup\$

Okay, found the solution here.

CppStandard = CppStandardVersion.Cpp17;

I added this to my myproject.Build.cs

\$\endgroup\$
1
  • \$\begingroup\$ Make sure to close VS and in UE4 do File -> Refresh Visual Studio project Files after this change. This fixes the project settings for IntelliSense to work. \$\endgroup\$
    – javs
    May 26 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.