Compiling errors in MSVC\14.32.31326\INCLUDE\filesystem

cedric 21 Reputation points
2022-05-25T08:23:15.067+00:00

Hello,

My project is a very old Unreal Engine project, that has seen many versions of VS and UE.
I'm currently trying to migrate it to UE5 and i get a bunch of errors on a MSVC file:

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'
[...]

There are hundreds of those errors.
Moreover, some of those references are supposed to be warning (ex: C4003 and C4227) but are here treated as errors.

After a few hours of research/posting on the Unreal Forum and googling, i still have no clue of what the problem could be, or if there is some option in the project configuration telling the compiler to treat warnings as errors.

The configuration type of the project is Makfile, and i didn't specify any extra option regarding the warning level:

205350-ue5projectoptions.png

Any ideas where those strange errors could come from ?

Thanks
Cedric

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,585 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,519 questions
{count} votes

1 answer

Sort by: Most helpful
  1. cedric 21 Reputation points
    2022-05-26T10:30:39.663+00:00

    Ok, problem solved.

    The _HAS_CXX17 wasn't defined in my project, leading to the non inclusion of many headers, leading to all those errors.

    205817-cxx2017include.png

    Strangely enough, i couldn't find the pragma message in my logs, too bad, would have saved a lot of time^^

    Anyway, after adding the required definition, it compiled fine.

    Cheers
    Cedric

    0 comments No comments