Cannot build Unreal Engine 5 from source (release branch)

Hello,

I followed all of the instructions here and here for downloading + building UE5 from source. However, I am consistently receiving the following error(s). Simply redownloading the source code and rebuilding it does not seem to help, either.

I did some googling for this and most results point to it being an issue in the way the parameters are declared. However I could not find anybody who had the same issue when compiling UE5 from source, and I am very much a noob at C++, so I am not too sure what to change. I also tried to simply ignore this issue and build our project anyways, but it appears that a bunch of plugins cannot be rebuilt when I swap to this version. It builds just fine otherwise, but I cannot do network builds without building from source.

ChaosUserDataPT.h(105): [C4458] declaration of ‘Solver’ hides class member
SimCallbackObject.h(201): [C4458] see declaration of ‘Chaos::ISimCallbackObject::Solver’
ChaosUserDataPT.h(102): [C4458] while compiling class template member function ‘bool Chaos::TUserDataManagerPT::SetData_GT(const Chaos::FRigidBodyHandle_External &,const TUserData &)’
ChaosUserDataPTTests.cpp(40): [C4458] see reference to function template instantiation ‘bool Chaos::TUserDataManagerPT::SetData_GT(const Chaos::FRigidBodyHandle_External &,const TUserData &)’ being compiled
ChaosUserDataPTTests.cpp(11): [C4458] see reference to class template instantiation ‘Chaos::TUserDataManagerPT’ being compiled
Microsoft.MakeFile.targets(44, 5): [MSB3073] The command “…..\Build\BatchFiles\Build.bat ChaosUserDataPTTests Win64 Development -WaitMutex -FromMsBuild” exited with code 6.

2 Likes

Change to: if (this->GetSolver() != nullptr)

It’s a warning that’s getting flagged as an error. Solver isn’t used in this function anyway.

5 Likes

Hey @IndySapper42,
so where exactly should I change the code to the one you posted?

Cheers!

I’m getting a similar error building UE5. Has there been a solution?

“c:\UnrealEngine\UE5.sln” (build target) (1) →
“c:\UnrealEngine\Engine\Intermediate\ProjectFiles\ChaosUserDataPTTests.vcxproj” (default target) (6) →
(Build target) →
C:\UnrealEngine\Engine\Plugins\Experimental\ChaosUserDataPT\Source\ChaosUserDataPT\Public\ChaosUserDat
aPT.h(105): error C4458: declaration of ‘Solver’ hides class member [c:\UnrealEngine\Engine\Intermediate
\ProjectFiles\ChaosUserDataPTTests.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.Make
File.Targets(45,5): error MSB3073: The command “…..\Build\BatchFiles\Build.bat ChaosUserDataPTTests Wi
n64 Development -WaitMutex -FromMsBuild” exited with code 6. [c:\UnrealEngine\Engine\Intermediate\Projec
tFiles\ChaosUserDataPTTests.vcxproj]

@xObscuritas I followed @IndySapper42 suggestion and it built successfully. Thank you!

I changed the C:\UnrealEngine\Engine\Plugins\Experimental\ChaosUserDataPT\Source\ChaosUserDataPT\Public\ChaosUserDataPT.h

Line 105:
if (const FPhysicsSolverBase* Solver = this->GetSolver()) to if (this->GetSolver() != nullptr)

4 Likes

Thank you @IndySapper42, your solution worked. You save my day