# UE 5.1 Source game project build fails on MacOSX

**URL:** <https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449>\
**Category:** Platform & Builds\
**Tags:** MAC-OS-X, error-building, Builds, build, MAC, unreal-engine, build-failed, question\
**Created:** [August 31, 2023, 6:37am UTC](https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449 "2023-08-31T06:37:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RandomCouch](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/randomcouch/32/943340_2.png) [@RandomCouch](https://forums.unrealengine.com/u/RandomCouch)\
**Post date:** [August 31, 2023, 6:37am UTC](https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449/1 "2023-08-31T06:37:16Z")

</div>

I am trying to build my client configuration of my project on MacOSX, also through Jenkins, but I am getting this error:

```auto
02:16:29 [11/60] Compile Module.UnrealHeaderTool.2_of_2.cpp
02:16:29 In file included from ../Intermediate/Build/Mac/x86_64/UnrealHeaderTool/Development/UnrealHeaderTool/Module.UnrealHeaderTool.2_of_2.cpp:6:
02:16:29 /Users/Shared/EpicGames/UE_5.1.1_Source/Engine/Source/Programs/UnrealHeaderTool/Private/PropertyTypes.cpp:432:109: error: no member named 'ref' in namespace 'std'
02:16:29 return PropertyTypeDispatch<CreateEngineTypeDispatch, bHandleContainers, FProperty*>(PropDef, Scope, std::ref(Name), ObjectFlags);
02:16:29 ~~~~~ ^
02:16:29 /Users/Shared/EpicGames/UE_5.1.1_Source/Engine/Source/Programs/UnrealHeaderTool/Private/PropertyTypes.cpp:2939:107: error: no member named 'ref' in namespace 'std'
02:16:29 return PropertyTypeDispatch<DefaultValueStringCppFormatToInnerFormatDispatch, false, bool>(PropDef, std::ref(CppForm), std::ref(OutForm));
02:16:29 ~~~~~ ^
02:16:29 /Users/Shared/EpicGames/UE_5.1.1_Source/Engine/Source/Programs/UnrealHeaderTool/Private/PropertyTypes.cpp:2939:126: error: no member named 'ref' in namespace 'std'
02:16:29 return PropertyTypeDispatch<DefaultValueStringCppFormatToInnerFormatDispatch, false, bool>(PropDef, std::ref(CppForm), std::ref(OutForm));
02:16:29 ~~~~~ ^
02:16:29 3 errors generated.

```

What am I doing wrong? The error doesn’t make much sense.

I’m running this command:

```auto
/Users/Shared/EpicGames/UE_5.1.1_Source/Engine/Build/BatchFiles/Mac/Build.sh MyProjectClient Mac Development -Project=/path/to/project/MyProject.uproject -WaitMutex -FromMsBuild

```

---

<div class="post-metadata">

**Author:** ![sen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sen/32/764276_2.png) [@sen](https://forums.unrealengine.com/u/sen)\
**Post date:** [October 18, 2023, 3:02am UTC](https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449/2 "2023-10-18T03:02:15Z")

</div>

Do you solve the problem？ what is your Xcode version? I have met the same problem with Xcode 14.3.1 and UE 5.1.0.

---

<div class="post-metadata">

**Author:** ![luca\_costanza](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/luca_costanza/32/556660_2.png) [@luca\_costanza](https://forums.unrealengine.com/u/luca_costanza)\
**Post date:** [October 25, 2023, 1:53pm UTC](https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449/3 "2023-10-25T13:53:47Z")

</div>

Hi had this problem updating xcode, I’ve fixed simply adding `#include <functional>`

---

<div class="post-metadata">

**Author:** ![GrayscaleInt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrayscaleInt](https://forums.unrealengine.com/u/GrayscaleInt)\
**Post date:** [November 21, 2024, 11:09pm UTC](https://forums.unrealengine.com/t/ue-5-1-source-game-project-build-fails-on-macosx/1278449/4 "2024-11-21T23:09:43Z")

</div>

Hey!  
I stumbled across this post…  
Is there any chance you could guide us where did you add that #include line?
