# Can't compile UE5.4

**URL:** <https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [May 3, 2024, 5:40am UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571 "2024-05-03T05:40:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 3, 2024, 5:40am UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/1 "2024-05-03T05:40:55Z")

</div>

I have a C++ project that I’m upgrading from UE5.3 to UE5.4. Its not compiled from source, just using factory fresh UE5.4

When compiling my project, I’m getting:

> UE\_5.4\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2760: syntax error: ‘const’ was unexpected here; expected ‘expression’

Its coming from this function inside ImplicitObjectScaled.h:

```auto

template<typename T>
const T* UnwrapImplicit(const FImplicitObject& Implicit, FVec3& OutScale, FReal &OutMargin)
{
	OutScale = FVec3(1);
	OutMargin = FReal(0);

	if (const TImplicitObjectScaled<T>* ScaledImplicit = Implicit.template GetObject<TImplicitObjectScaled<T>>())
	{
		OutScale = ScaledImplicit->GetScale();
		OutMargin = ScaledImplicit->GetMargin();
		return ScaledImplicit->GetUnscaledObject();
	}
	else if (const TImplicitObjectInstanced<T>* InstancedImplicit = Implicit.template GetObject<TImplicitObjectInstanced<T>>())
	{
		OutMargin = InstancedImplicit->GetMargin();
		return InstancedImplicit->GetInstancedObject();
	}
	else if (const T* RawImplicit = Implicit.template GetObject<T>())
	{
		OutMargin = RawImplicit->GetMargin();
		return RawImplicit;
	}
	else
	{
		return nullptr;
	}
}

```

Not sure how to get around this or why it would be failing to compile this?

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [May 3, 2024, 8:44am UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/2 "2024-05-03T08:44:22Z")

</div>

Greetings @DentonJC

I did some research on this issue(There was quite a bit on Error C2760) and there are a few causes for this. However, I’d start by ensuring all of your VS(Visual Studio) versions are up to date. If not, update them and try compiling again. Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 5, 2024, 5:45pm UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/3 "2024-05-05T17:45:01Z")

</div>

Thanks for the reply.

I was using VS 2022, using the MSVC v143 2022 compiler v 14.39

After fumbling around with different compiler version, I found this error during a compile:

> UnrealBuildTool has banned the MSVC 14.39.33519-14.39.99999 toolchains due to compiler issues. Please install a different toolchain such as 14.38.33130 by opening the generated solution and installing recommended components or from the Visual Studio installer.

So I installed 14.31 as per this thread: [UnrealBuildTool has banned the MSVC toolchain](https://forums.unrealengine.com/t/unrealbuildtool-has-banned-the-msvc-toolchain/556715) but I still get the error.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 5, 2024, 8:48pm UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/4 "2024-05-05T20:48:12Z")

</div>

okay installing this one  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/3/c73227004195cfba1e6c620d76830f6eaf5768af.png)

seemed to do the trick

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [May 6, 2024, 4:35am UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/5 "2024-05-06T04:35:37Z")

</div>

Oh, right on! I’m glad to see that you were able to resolve it! Have a great week!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [June 5, 2024, 4:36am UTC](https://forums.unrealengine.com/t/cant-compile-ue5-4/1837571/6 "2024-06-05T04:36:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
