Getting "error C4756: overflow in constant arithmetic" while building Unreal 5.4.2 from source code

Hello,

The best option in my opinion is to use the preprocessor variable _UCRT_LEGACY_INFINITY that has been added to the corecrt_math.h header:

That can be achieved by adding this line to the Build.cs file:

PublicDefinitions.Add("_UCRT_LEGACY_INFINITY");
2 Likes