Unable to Package UE5.0.3 project with Cesium v1.19.0

This problem still exists in the latest version and cannot be resolved using the solution you provided earlier.
I have tried this solution but it was of no use.
I created a new Actor that inherits from ACesium3DFileset, and then introduced this Actor in another header file called Controller (Controller is used to control this Actor). At this point, the compiled project will display:

11> F: \ Program Files \ Epic Games \ UE_ 5.3 \ Engine \ Plugins \ Marketplace \ CesiumForUnreal \ Source \ ThirdParty \ include \ CesiumGltf \ Material. h (27): error C2059: syntax error: “constant”
11> F: \ Program Files \ Epic Games \ UE_ 5.3 \ Engine \ Plugins \ Marketplace \ CesiumForUnreal \ Source \ ThirdParty \ include \ CesiumGltf \ Material. h (27): error C2238: Unexpected tag before ‘;’
11> F: \ Program Files \ Epic Games \ UE_ 5.3 \ Engine \ Plugins \ Marketplace \ CesiumForUnreal \ Source \ ThirdParty \ include \ CesiumGltf \ Material. h (93): error C2589: “Constant”: Illegal marker on the right side of “::”
11> F: \ Program Files \ Epic Games \ UE_ 5.3 \ Engine \ Plugins \ Marketplace \ CesiumForUnreal \ Source \ ThirdParty \ include \ CesiumGltf \ Material. h (93): error C2062: Unexpected type ‘unknown type’

The UE version I am using is 5.3, and the Cesium version is the latest.

The Controller header file also introduces GeoReferencingSystem. h, but even if I don’t, I will still report an error.
The new Actor inherited from ACesium3DFileset also introduces WebMapTileOverlay based on CesiumRasterOverlay implementation. Strangely, if a new Actor is not introduced in the Controller header file, the project can start smoothly and the new Actor can be used normally.

I don’t know. Those errors are in an Unreal header file, so it’s not clear it has anything to do with Cesium for Unreal. Perhaps there is a problem in a header file included before that one. Could be as simple as a missing semicolon at the end of a class definition. C++ is notoriously persnickety. Or perhaps you accidentally typed ACesium3DFileset in the code, too. It should be ACesium3DTileset with a T.

Sorry, the ACesium3DTileset is marked with a T, it’s just that I made a spelling error while posting just now, but there is no spelling error in the code. And the error message shows that the error occurred in the header file of Cesium Native, and it is not only me who has this problem, but also our entire project team.

Oh sorry that’s CesiumGltf/Material.h, not Unreal’s. So yes, you’re right, definitely part of cesium-native.

The line of code it’s complaining about is:

inline static const std::string OPAQUE = "OPAQUE";

As far as I know, there’s nothing wrong with that. It probably does require a C++17 compiler, though. Are you certain your project is configured to use C++17?

Beyond that, I really don’t know. I’m not doubting that it’s a real problem, but where the problem exists and how to fix it I can’t guess. Sharing your complete code (or - even a better - a minimal version of it) would probably help.

I successfully solved this problem. My original intention was to create a new actor that inherits ACesium3DTileset and adds my own method to this new actor. When there are no other files referencing this new Actor, the project can compile successfully, but once there are other files referencing this new Actor, compilation will fail and the above error will be generated.

My current solution is to create a new Actor that inherits from AActor, then create an ACesium3DTileset in its BeginPlay method and maintain a reference to ACesium3DTileset as a private variable, while attaching it to the new Actor.

UATHelper: 打包 (Windows): [2/2] Link [x64] CesuimPro.exe
UATHelper: 打包 (Windows): ���ڴ����� G:\UESave\CesuimPro\Binaries\Win64\CesuimPro.lib �Ͷ��� G:\UESave\CesuimPro\Binaries\Win64\CesuimPro.exp
LogSlate: Took 0.000226 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/Slate/Fonts/NotoNaskhArabicUI-Regular.ttf’ (144K)
LogSlate: Last resort fallback font was requested. Font: ‘…/…/…/Engine/Content/Slate/Fonts/DroidSansFallback.ttf’, Character: ‘Ͷ (U+0376)’
LogSlate: Took 0.001518 seconds to synchronously load lazily loaded font ‘…/…/…/Engine/Content/SlateDebug/Fonts/LastResort.ttf’ (5269K)
UATHelper: 打包 (Windows): Cesium3DTilesReader.lib(SubtreeFileReader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(WebMapServiceRasterOverlay.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(RasterOverlayTileProvider.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(QuadtreeRasterOverlayTileProvider.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesContent.lib(SubtreeAvailability.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(BingMapsRasterOverlay.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(IonRasterOverlay.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(RasterizedPolygonsOverlay.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumRasterOverlays.lib(TileMapServiceRasterOverlay.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(ImplicitQuadtreeLoader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumAsync.lib(CachingAssetAccessor.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumAsync.lib(GunzipAssetAccessor.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): CesiumGltfReader.lib(GltfReader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(CesiumIonTilesetLoader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(LayerJsonTerrainLoader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(TilesetJsonLoader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(ImplicitOctreeLoader.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(TilesetMetadata.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(RasterOverlayCollection.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(TilesetContentManager.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(RasterOverlayUpsampler.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Module.CesiumRuntime.8_of_11.cpp.obj : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Module.CesiumRuntime.9_of_11.cpp.obj : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Module.CesiumRuntime.11_of_11.cpp.obj : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): Cesium3DTilesSelection.lib(Tileset.obj) : error LNK2001: �޷��������ⲿ���� __std_find_trivial_8
UATHelper: 打包 (Windows): draco.lib(point_cloud.obj) : error LNK2019: �޷��������ⲿ���� __std_find_trivial_4������ “int * __cdecl __std_find_trivial<int,int>(int *,int *,int)” (??$__std_find_trivial@HH@@YAPEAHPEAH0H@Z) �������˸÷���
UATHelper: 打包 (Windows): s2geometry.lib(s2cell_id.obj) : error LNK2019: �޷��������ⲿ���� __std_init_once_link_alternate_names_and_abort������ “public: __cdecl std::_Init_once_completer::~_Init_once_completer(void)” (??1_Init_once_completer@std@@QEAA@XZ) �������˸÷���
UATHelper: 打包 (Windows): G:\UESave\CesuimPro\Binaries\Win64\CesuimPro.exe : fatal error LNK1120: 3 ���޷��������ⲿ����
UATHelper: 打包 (Windows): Took 8.1129407s to run dotnet.exe, ExitCode=6
UATHelper: 打包 (Windows): UnrealBuildTool failed. See log for more details. (C:\Users\GDF\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.2\UBT-CesuimPro-Win64-Development.txt)
UATHelper: 打包 (Windows): AutomationTool executed for 0h 0m 10s
UATHelper: 打包 (Windows): AutomationTool exiting with ExitCode=6 (6)
UATHelper: 打包 (Windows): BUILD FAILED