# Migrating to UE5 =\> errors in msvc\\filesystem

**URL:** <https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, question, CPP\
**Created:** [May 15, 2022, 9:35am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592 "2022-05-15T09:35:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 15, 2022, 9:35am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/1 "2022-05-15T09:35:29Z")

</div>

Hello,

I’m trying to compile my 4.27 project to UE5 and i get a ton of errors on msvc’s filesystem.  
A few example:

```auto
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C4003: not enough arguments for function-like macro invocation 'concat'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C4227: anachronism used: qualifiers on reference are ignored
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2988: unrecognizable template declaration/definition
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2143: syntax error: missing ';' before '&'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2365: '_Src': redefinition; previous definition was 'template parameter'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(892): note: see declaration of '_Src'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2238: unexpected token(s) preceding ';'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2059: syntax error: '&'
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(893): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
2>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\INCLUDE\filesystem(898): error C2365: '_InIt': redefinition; previous definition was 'template parameter'

```

I tried various versions of MSVC, i even upgraded from VS2019 to VS2022 to be sure to get the latest everything, but i still get the same list of errors.

I guess my project configuration must be wrong somewhere but i couldn’t find anything related to this on google.

Any idea ?

Thanks  
Cedric

---

<div class="post-metadata">

**Author:** ![Naocan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Naocan](https://forums.unrealengine.com/u/Naocan)\
**Post date:** [May 15, 2022, 10:17am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/2 "2022-05-15T10:17:30Z")

</div>

Did you try a rebuild instead of just build?

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 15, 2022, 10:54am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/3 "2022-05-15T10:54:20Z")

</div>

I did, cleaning, deleting the projects folders (binaries, intermediate, etc), rebuilding, many times, with no visible effect.

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 15, 2022, 8:12pm UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/4 "2022-05-15T20:12:05Z")

</div>

When looking at this page:

> **[Compiler Warning (level 1) C4003](https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4003?view=msvc-170)**
>
> Learn more about: Compiler Warning (level 1) C4003

It seems that C4003 is supposed to be a warning but i get an error instead.

So i guess that somewhere in my configuration is something that tells VS to treat warnings as errors.

To be continued…

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 24, 2022, 7:08pm UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/5 "2022-05-24T19:08:09Z")

</div>

Is there any official windows 10 sdk version to use with UE5 ?  
I have tried 18362, 19041 (default), and 20348 with no success.

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 26, 2022, 8:28am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/6 "2022-05-26T08:28:20Z")

</div>

I tried to force versions of C++ (/c++17, /c++20, and nothing to let VS use its default version), but no luck.

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [May 26, 2022, 10:47am UTC](https://forums.unrealengine.com/t/migrating-to-ue5-errors-in-msvc-filesystem/557592/7 "2022-05-26T10:47:54Z")

</div>

Ok, problem solved.  
\_HAS\_CXX17 wasn’t defined in my project and because of that, some necessary inclusions in the filesystem file weren’t made, leading to all those errors.  
So i just had to define it in my build.cs and it compiled fine.

```auto
PublicDefinitions.Add("_HAS_CXX17=0");

```

Cedric
