Unresolved externals when trying to compile

Hi all,

I successfully managed to compile a build of my test project last month, but I am unable to do so now. The only thing codewise that’s really changed is the latest Cesium update I think. I’m getting this error now:

UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.cpp.obj : error LNK2001: unresolved external symbol __CxxFrameHandler4
UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.gen.cpp.obj : error LNK2001: unresolved external symbol __CxxFrameHandler4
UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.cpp.obj : error LNK2001: unresolved external symbol __GSHandlerCheck_EH4

Just to verify, I reinstalled the Cesium Samples project and tried compiling that and it gave me the same error. This is when compiling for 64 bit windows, development config.

Any suggestions?

Thanks!

I have the same problem! Did you manage to solve yours?

Nope, it’s been a few weeks since I’ve tried compiling but was still not able to the last time I tried. I can tell you what doesn’t fix the problem though :slight_smile:

If you figure out a solution would you please note it on here? Would love to eventually be able to compile the project. Thanks!

Alan

Hello @hanuli and @mahalobay

Are you still experiencing this issue? The plugin was just updated to version 1.4.0, and that may help the problem. If you get a chance, please try updating the plugin and compiling again.

I’ve put compiling on the backburner, so I’ll update the plugin and try recompiling to see. I was in touch with @Kevin_Ring and I was also unable to compile the vanilla CesiumForUnrealSamples-v1.3.0 project at the time. Is there also a new 1.4.0 version of the Samples project I can try compiling with, to see if it works this time?

Just tried recompiling CesiumForUnrealSamples with the updated plugin, still fails

Are you building Cesium for Unreal yourself? i.e. is Cesium for Unreal in your project’s Plugins directory? Or is it just in your Engine plugins directory?

It’s only a guess, but those errors look like what you’d get if you compiled cesium-native with Visual Studio 2019, and then tried to compile Cesium for Unreal with Visual Studio 2017.

I am unfortunately not programmer savvy enough to try to compile my own Cesium For Unreal :expressionless: I am merely using the plugin as compiled and available from the marketplace and running a build directly from that.

My current machine does not have VS2019, it has/had 2015 which is now superseded with an install of VS2017.

Note that as I mentioned, I was able to successful build an executable with an earlier version of Cesium For Unreal in April. Sometime between that and 1.3.0, it began to fail to build.

Apologies if you’ve already posted this somewhere, but can you share your complete log? Are you building in Visual Studio or in Unreal Engine?

If you’re using Cesium for Unreal as an Engine plugin, there’s usually no need to compile at all. Cesium for Unreal is already compiled, and a Blueprints-only project doesn’t need to be compiled. So the only reason your project would (should?) need to be compiled is if you have other C++ code in it. Perhaps there is some conflict with that C++ code?

But you said you’re using the Cesium for Unreal Samples project, and that is definitely Blueprints-only and thus compiling it makes no sense. So… I’m a bit lost.

Ah, sorry, my bad for using wrong terminology :slight_smile: It happens when I try to package the project, I mean (as Windows 64-bit)

The packaging fails almost instantly - this is literally the entirety of the Output Log as it pertains to the packaging attempt:

LogUObjectHash: Compacting FUObjectHashTables data took 0.96ms
LogMainFrame: Project requires temp target (CesiumForUnreal plugin is enabled)
LogLauncherProfile: Unable to use promoted target - …/…/…/…/…/…/TEST/Binaries/Win64/UE4Game.target does not exist.
UATHelper: Packaging (Windows (64-bit)): Running AutomationTool…
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject=C:/TEST/CesiumForUnrealSamples.uproject BuildCookRun -nocompileeditor -installed -nop4 -project=C:/TEST/CesiumForUnrealSamples.uproject -cook -stage -archive -archivedirectory=C:/TEST/xxx -package -ue4exe=“C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\Win64\UE4Editor-Cmd.
exe” -ddc=InstalledDerivedDataBackendGraph -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -clientconfig=Development -utf8output
UATHelper: Packaging (Windows (64-bit)): Setting up ProjectParams for C:\TEST\CesiumForUnrealSamples.uproject
UATHelper: Packaging (Windows (64-bit)): CesiumForUnrealSamples.uproject requires a temporary target.cs to be generated (CesiumForUnreal plugin is enabled)
UATHelper: Packaging (Windows (64-bit)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): Running: C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe CesiumForUnrealSamples Win64 Development -Project=C:\TEST\CesiumForUnrealSamples.uproject C:\TEST\CesiumForUnrealSamples.uproject -NoUBTMakefiles -remoteini=“C:\TEST” -skipdeploy -Manifest=C:\TEST\Intermediate\Build\Manifest.xml
-NoHotReload -log=“C:\Users\Alan\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-CesiumForUnrealSamples-Win64-Development.txt”
UATHelper: Packaging (Windows (64-bit)): Writing manifest to C:\TEST\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Windows (64-bit)): Building CesiumForUnrealSamples…
UATHelper: Packaging (Windows (64-bit)): Using Visual Studio 2017 14.16.27040 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023) and Windows 10.0.17763.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows (64-bit)): [Upgrade]
UATHelper: Packaging (Windows (64-bit)): [Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
UATHelper: Packaging (Windows (64-bit)): [Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
UATHelper: Packaging (Windows (64-bit)): [Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
UATHelper: Packaging (Windows (64-bit)): [Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See IWYU | Unreal Engine Documentation. (Previously: PCHUsageMode.UseSharedPCHs).
UATHelper: Packaging (Windows (64-bit)): [Upgrade] Suppress this message by setting ‘DefaultBuildSettings = BuildSettingsVersion.V2;’ in CesiumForUnrealSamples.Target.cs, and explicitly overriding settings that differ from the new defaults.
UATHelper: Packaging (Windows (64-bit)): [Upgrade]
UATHelper: Packaging (Windows (64-bit)): Building 2 actions with 8 processes…
UATHelper: Packaging (Windows (64-bit)): [1/2] CesiumForUnrealSamples.exe
UATHelper: Packaging (Windows (64-bit)): Creating library C:\TEST\Binaries\Win64\CesiumForUnrealSamples.lib and object C:\TEST\Binaries\Win64\CesiumForUnrealSamples.exp
UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.cpp.obj : error LNK2001: unresolved external symbol __CxxFrameHandler4
UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.gen.cpp.obj : error LNK2001: unresolved external symbol __CxxFrameHandler4
UATHelper: Packaging (Windows (64-bit)): Module.CesiumRuntime.cpp.obj : error LNK2001: unresolved external symbol __GSHandlerCheck_EH4
UATHelper: Packaging (Windows (64-bit)): C:\TEST\Binaries\Win64\CesiumForUnrealSamples.exe : fatal error LNK1120: 2 unresolved externals
UATHelper: Packaging (Windows (64-bit)): Took 8.2447645s to run UnrealBuildTool.exe, ExitCode=6
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool failed. See log for more details. (C:\Users\Alan\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-CesiumForUnrealSamples-Win64-Development.txt)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=6 (6)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

Ok I just tried this myself. Here’s the relevant portion of my log:

LogUObjectHash: Compacting FUObjectHashTables data took   0.39ms
LogMainFrame: Project requires temp target (CesiumForUnreal plugin is enabled)
LogLauncherProfile: Unable to use promoted target - ../../../../../../Test/CesiumforUnrealSamples/Binaries/Win64/UE4Game.target does not exist.
UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject=C:/Test/CesiumforUnrealSamples/CesiumForUnrealSamples.uproject BuildCookRun -nocompileeditor -installed -nop4 -project=C:/Test/CesiumforUnrealSamples/CesiumForUnrealSamples.uproject -cook -stage -archive -archivedirectory=C:/Test/package -package -ue4exe="C:\Program Files\Epic 
Games\UE_4.26\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -ddc=InstalledDerivedDataBackendGraph -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -clientconfig=Development -utf8output
UATHelper: Packaging (Windows (64-bit)): Setting up ProjectParams for C:\Test\CesiumforUnrealSamples\CesiumForUnrealSamples.uproject
UATHelper: Packaging (Windows (64-bit)): CesiumForUnrealSamples.uproject requires a temporary target.cs to be generated (CesiumForUnreal plugin is enabled)
UATHelper: Packaging (Windows (64-bit)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): Running: C:\Program Files\Epic Games\UE_4.26\Engine\Binaries\DotNET\UnrealBuildTool.exe CesiumForUnrealSamples Win64 Development -Project=C:\Test\CesiumforUnrealSamples\CesiumForUnrealSamples.uproject  C:\Test\CesiumforUnrealSamples\CesiumForUnrealSamples.uproject -NoUBTMakefiles  -remoteini="C:\Test\CesiumforUnrealSa
mples" -skipdeploy -Manifest=C:\Test\CesiumforUnrealSamples\Intermediate\Build\Manifest.xml -NoHotReload -log="C:\Users\kring\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UBT-CesiumForUnrealSamples-Win64-Development.txt"
UATHelper: Packaging (Windows (64-bit)):   Parsing headers for CesiumForUnrealSamples
UATHelper: Packaging (Windows (64-bit)):     Running UnrealHeaderTool "C:\Test\CesiumforUnrealSamples\CesiumForUnrealSamples.uproject" "C:\Test\CesiumforUnrealSamples\Intermediate\Build\Win64\CesiumForUnrealSamples\Development\CesiumForUnrealSamples.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abs
log="C:\Users\kring\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\UHT-CesiumForUnrealSamples-Win64-Development.txt" -installed
UATHelper: Packaging (Windows (64-bit)):   Reflection code generated for CesiumForUnrealSamples in 3.158261 seconds
UATHelper: Packaging (Windows (64-bit)):   Writing manifest to C:\Test\CesiumforUnrealSamples\Intermediate\Build\Manifest.xml
UATHelper: Packaging (Windows (64-bit)):   Building CesiumForUnrealSamples...
UATHelper: Packaging (Windows (64-bit)):   Using Visual Studio 2019 14.29.30038 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
UATHelper: Packaging (Windows (64-bit)):   [Upgrade]
UATHelper: Packaging (Windows (64-bit)):   [Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
UATHelper: Packaging (Windows (64-bit)):   [Upgrade]     bLegacyPublicIncludePaths = false                 => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
UATHelper: Packaging (Windows (64-bit)):   [Upgrade]     ShadowVariableWarningLevel = WarningLevel.Error   => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
UATHelper: Packaging (Windows (64-bit)):   [Upgrade]     PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs   => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
UATHelper: Packaging (Windows (64-bit)):   [Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in CesiumForUnrealSamples.Target.cs, and explicitly overriding settings that differ from the new defaults.
UATHelper: Packaging (Windows (64-bit)):   [Upgrade]
UATHelper: Packaging (Windows (64-bit)):   Building 6 actions with 12 processes...
UATHelper: Packaging (Windows (64-bit)):     [1/6] turbojpeg.dll
UATHelper: Packaging (Windows (64-bit)):     [2/6] Default.rc2
UATHelper: Packaging (Windows (64-bit)):     [3/6] SharedPCH.Core.cpp
UATHelper: Packaging (Windows (64-bit)):     [4/6] CesiumForUnrealSamples.cpp
UATHelper: Packaging (Windows (64-bit)):     [5/6] CesiumForUnrealSamples.exe
UATHelper: Packaging (Windows (64-bit)):        Creating library C:\Test\CesiumforUnrealSamples\Binaries\Win64\CesiumForUnrealSamples.lib and object C:\Test\CesiumforUnrealSamples\Binaries\Win64\CesiumForUnrealSamples.exp
UATHelper: Packaging (Windows (64-bit)):     [6/6] CesiumForUnrealSamples.target
UATHelper: Packaging (Windows (64-bit)):   Total time in Parallel executor: 9.44 seconds
UATHelper: Packaging (Windows (64-bit)):   Total execution time: 15.10 seconds
UATHelper: Packaging (Windows (64-bit)): Took 15.2059558s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Packaging (Windows (64-bit)): ********** BUILD COMMAND COMPLETED **********

The thing that jumps out at me here is that my system is using Visual Studio 2019 instead of 2017. This is despite the fact that I’ve changed the project settings to use Visual Studio 2017 (I have both installed):

Cesium for Unreal is compiled with Visual Studio 2017. In fact, if you’ve installed it from the Epic Marketplace, it’s been compiled by Epic themselves according to their specifications. So I don’t know why VS2017 would have linker errors, nor do I know why UE seems to be ignoring the setting on my system. But I suspect you can get past your issue simply by installing Visual Studio 2019. Is there a reason that’s not possible?

Kevin

No reason except for it was specifically mentioned to use VS2017 instead of 19 :slight_smile:

I will give this a try later this week when I get a chance and let you know. Thanks for following up!

Hi Kevin,

I installed VS2019 this weekend and tested with Default, VS2017 and VS2019 compiler settings and all three failed to package… :frowning:

I am not in need of packaging yet so I will table this for the moment, but just wanted to let you know 2019 did not solve the issue

Thanks for testing!
Alan

I meet the same problem, change to VS2019,no help ::

Hi all, returning to this test project after several months. I’ve noticed that with UE updated to 4.27.2 and the latest Cesium plugin installed, I am able to successfully compile a working build (on the same original machine that failed). Just wanted to pass along the info.

1 Like