Linker Error while packaging project UE5.2

Using Unreal engine 5.2 with cesium version 2.9.0 from marketplace I am trying to build my project. I am getting the following error.

UATHelper: Packaging (Windows):    Creating library C:\Projects\Unreal\SVR_CesiumEarthCopy\Binaries\Win64\CesiumForUnrealSamples.lib and object C:\Projects\Unreal\SVR_CesiumEarthCopy\Binaries\Win64\CesiumForUnrealSamples.exp
UATHelper: Packaging (Windows): Cesium3DTilesReader.lib(SubtreeFileReader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): absl_log_internal_log_sink_set.lib(log_sink_set.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(WebMapServiceRasterOverlay.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(RasterOverlayTileProvider.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(QuadtreeRasterOverlayTileProvider.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesContent.lib(SubtreeAvailability.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(BingMapsRasterOverlay.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(IonRasterOverlay.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(RasterizedPolygonsOverlay.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumRasterOverlays.lib(TileMapServiceRasterOverlay.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(ImplicitQuadtreeLoader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumAsync.lib(CachingAssetAccessor.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumAsync.lib(GunzipAssetAccessor.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): CesiumGltfReader.lib(GltfReader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(CesiumIonTilesetLoader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(LayerJsonTerrainLoader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(TilesetJsonLoader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(ImplicitOctreeLoader.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(TilesetMetadata.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(RasterOverlayCollection.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(TilesetContentManager.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(RasterOverlayUpsampler.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Module.CesiumRuntime.8_of_12.cpp.obj : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Module.CesiumRuntime.10_of_12.cpp.obj : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Module.CesiumRuntime.12_of_12.cpp.obj : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): Cesium3DTilesSelection.lib(Tileset.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
UATHelper: Packaging (Windows): draco.lib(point_cloud.cc.obj) : error LNK2019: unresolved external symbol __std_find_trivial_4 referenced in function "int * __cdecl std::_Find_unchecked<int *,int>(int *,int * const,int const &)" (??$_Find_unchecked@PEAHH@std@@YAPEAHPEAHQEAHAEBH@Z)
UATHelper: Packaging (Windows): absl_strings.lib(charconv_bigint.cc.obj) : error LNK2019: unresolved external symbol __std_find_trivial_1 referenced in function "char const * __cdecl std::_Find_unchecked<char const *,char>(char const *,char const * const,char const &)" (??$_Find_unchecked@PEBDD@std@@YAPEBDPEBDQEBDAEBD@Z)
UATHelper: Packaging (Windows): absl_str_format_internal.lib(arg.cc.obj) : error LNK2001: unresolved external symbol __std_find_trivial_1
UATHelper: Packaging (Windows): absl_str_format_internal.lib(arg.cc.obj) : error LNK2019: unresolved external symbol __std_find_trivial_2 referenced in function "private: static bool __cdecl absl::lts_20240116::str_format_internal::FormatArgImpl::Dispatch<wchar_t const *>(union absl::lts_20240116::str_format_internal::FormatArgImpl::Data,class absl::lts_20240116::str_format_internal::FormatConversionSpecImpl,void *)" (??$Dispatch@PEB_W@FormatArgImpl@str_format_internal@lts_20240116@absl@@CA_NTData@0123@VFormatConversionSpecImpl@123@PEAX@Z)
UATHelper: Packaging (Windows): C:\Projects\Unreal\SVR_CesiumEarthCopy\Binaries\Win64\CesiumForUnrealSamples.exe : fatal error LNK1120: 4 unresolved externals

I am using the latest MSVC v 143 build tools. I tried to do the things that are mentioned in this thread to no success.

Any help would be greatly appreciated.

Thank you.

Hi @Siddartha_G, welcome to the community!

What version of Visual Studio are you using for your project? Typically, these __std_find_trivial_8 errors appear when you’re using a different version than the one used to build the plugin. I would recommend using Visual Studio 2022, if you aren’t already.

1 Like

Hey @janine. Thank you for your response.
I am using the latest VS studio 2022 with v143 latest build tools. I use rider as my IDE.
I used the market place plugin and downloaded the latest plugin from Github. Neither of them worked for me.

@Siddartha_G please check that your Visual Studio 2022 installation is up-to-date. Unreal requires the v14.34 toolchain version or later, which first shipped with Visual Studio 2022 v17.4.0.

1 Like

@Kevin_Ring I had the latest build tools installed and the build failed. I installed the exact version 14.34 that has fixed the package issue. I provided a screenshot of all the Build tools I have Installed. Thank you very much.

Hi @Siddartha_G, since you have multiple toolchain versions installed, the problem is most likely that cesium-native is being built with one (by cmake in the extern directory), and cesium-unreal is being built with another (by the Unreal Build Tool). This is generally fine if the toolchain used by UBT is newer, but if it’s older, you’re likely to get linker errors.

Fixing this is a pain.

The easiest solution, if you can, is to have only one toolchain version installed. Then you’ll need to delete both your cesium-native build directory and your .ezvcpkg directory to make sure everything is rebuilt with the one toolchain.

Otherwise, you can control which version of MSVC is used, but that happens in three different places!

  1. The toolchain used by cesium-native’s cmake build can be controlled by passing -T version=14.34 -A x64 on the command-line when doing the cmake configure. Delete your build directory to make sure this change gets picked up.

  2. The toolchain used by the vcpkg third-party dependencies is specified in a triplet file, which on Windows is extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake. You’ll need to add a line like set(VCPKG_PLATFORM_TOOLSET_VERSION "14.34") to that file. Note that this file already has a line like that, but it’s only active when the CI environment variable is set. After changing the triplet file, delete your .ezvcpkg directory to make sure it takes effect.

  3. The toolchain used by the Unreal Build Tool is found in %userprofile%\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml (or $env:userprofile\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml in PowerShell). Add something like this:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<WindowsPlatform>
		<CompilerVersion>14.38.33130</CompilerVersion>
	</WindowsPlatform>
</Configuration>

Here you need the full three-part version number. The easiest way to get it is to look in C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC (or similar).

Note that if you’re using UE 5.5, then 14.38 is the minimum version supported.