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

**URL:** <https://forums.unrealengine.com/t/getting-error-c4756-overflow-in-constant-arithmetic-while-building-unreal-5-4-2-from-source-code/1897276>\
**Category:** Getting Started & Setup\
**Tags:** source-build, unreal-engine, Engine-Source-Code\
**Created:** [June 10, 2024, 8:08am UTC](https://forums.unrealengine.com/t/getting-error-c4756-overflow-in-constant-arithmetic-while-building-unreal-5-4-2-from-source-code/1897276 "2024-06-10T08:08:21Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![johny5.coder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@johny5.coder](https://forums.unrealengine.com/u/johny5.coder)\
**Post date:** [January 4, 2026, 5:58am UTC](https://forums.unrealengine.com/t/getting-error-c4756-overflow-in-constant-arithmetic-while-building-unreal-5-4-2-from-source-code/1897276/29 "2026-01-04T05:58:31Z")

</div>

To resume, options:

1. Patching Unreal code as in [@MeloinUnreal](https://dev.epicgames.com/community/api/user_profiles/tab-redirect/about?discourse_username=MeloinUnreal) post. This is quite invasive fix though, but the right way to go. Should be accepted as a PR.

2. Modify your `C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\corecrt_math.h`

3. Patch your UnrealBuildTool, at `Engine\Source\Programs\UnrealBuildTool\System\RulesAssembly.cs` inside `CreateTargetRulesInstance` look for `Rules.GlobalDefinitions` setup and, for example, after:

---

_[View the full topic](https://forums.unrealengine.com/t/getting-error-c4756-overflow-in-constant-arithmetic-while-building-unreal-5-4-2-from-source-code/1897276)._
