Anyone had any luck compiling Cesium for UE 5.1 Preview 2?
I’ve spent a day trying to make it compile but no luck so far as the errors are beyond my level of C++ knowledge. Cesium native compiled without any problems but the cesium plugin itself is the one I’m struggling with. I’ve used latest from ue5-main branch.
When trying to compile the plugin I’m getting following errors:
1>Building 10 actions with 10 processes…
1>[1/10] Link UnrealEditor-CesiumEditor.lib cancelled
1>[2/10] Compile Module.CesiumEditor.cpp
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumEditor\Private\CesiumPanel.h(5): fatal error C1083: Cannot open include file: ‘Dialogs/CustomDialog.h’: No such file or directory
1>[3/10] Compile Module.CesiumRuntime.6_of_6.cpp
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(221): error C4668: ‘ENGINE_MAJOR_VERSION’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(226): warning C4996: ‘UTexture2D::PlatformData’: Use GetPlatformData() / SetPlatformData() accessors instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(227): warning C4996: ‘UTexture2D::PlatformData’: Use GetPlatformData() / SetPlatformData() accessors instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(251): error C4668: ‘ENGINE_MAJOR_VERSION’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(256): warning C4996: ‘UTexture2D::PlatformData’: Use GetPlatformData() / SetPlatformData() accessors instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\ScreenCreditsWidget.cpp(257): warning C4996: ‘UTexture2D::PlatformData’: Use GetPlatformData() / SetPlatformData() accessors instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>[4/10] Compile Module.CesiumRuntime.2_of_6.cpp
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.h(25): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>[5/10] Compile Module.CesiumRuntime.4_of_6.cpp
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.h(25): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\LoadGltfResult.h(23): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\LoadGltfResult.h(50): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CreateGltfOptions.h(11): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CreateGltfOptions.h(22): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp(48): fatal error C1083: Cannot open include file: ‘IPhysXCookingModule.h’: No such file or directory
1>[6/10] Compile Module.CesiumRuntime.5_of_6.cpp
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.h(25): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(292): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(292): error C2143: syntax error: missing ‘;’ before ‘:’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(292): error C2143: syntax error: missing ‘;’ before ‘)’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(347): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(748): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(747): error C2143: syntax error: missing ‘;’ before ‘:’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(748): error C2143: syntax error: missing ‘;’ before ‘)’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(772): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(771): error C2143: syntax error: missing ‘;’ before ‘:’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(772): error C2143: syntax error: missing ‘;’ before ‘)’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(795): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(794): error C2143: syntax error: missing ‘;’ before ‘:’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(795): error C2143: syntax error: missing ‘;’ before ‘)’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(816): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumEncodedMetadataComponent.cpp(825): error C2039: ‘FunctionExpressions’: is not a member of ‘UMaterialFunctionMaterialLayer’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\Materials\MaterialFunctionMaterialLayer.h(16): note: see declaration of ‘UMaterialFunctionMaterialLayer’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\LoadGltfResult.h(23): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\LoadGltfResult.h(50): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CreateGltfOptions.h(11): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CreateGltfOptions.h(22): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.cpp(54): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.cpp(308): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.cpp(1197): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.cpp(2068): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Source\CesiumRuntime\Private\CesiumGltfComponent.cpp(2420): error C4668: ‘PHYSICS_INTERFACE_PHYSX’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’
1>[7/10] Link UnrealEditor-CesiumRuntime.lib cancelled
1>[8/10] Link UnrealEditor-CesiumRuntime.dll cancelled
1>[9/10] Link UnrealEditor-CesiumEditor.dll cancelled
1>[10/10] WriteMetadata devEditor.target cancelled
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE_5.1\Engine\Build\BatchFiles\Build.bat” devEditor Win64 Development -Project=“C:\Dev\cesium-unreal-samples\CesiumForUnrealSamples.uproject” -WaitMutex -FromMsBuild” exited with code -1.
1>Done building project “CesiumForUnrealSamples.vcxproj” – FAILED.
One of the issues seems to be that there’s no PhysX available in UE5.1. I have edited the cesium plugin code to not use PhysX but other issues still remain which I’m struggling to fix.
Anyone got any pointers on how to proceed?
Cheers