Cesium for unreal v2.7.1 Source code compilation error



Why?

See here:

1 Like

It’s settled. Thank you

Hi, I’ve been getting the same issue.

I was able to build successfully when I disabled all versions of MSVC except latest in VS but this causes build errors in UE5.3 which we are currently using.

I’ve followed your instructions but anytime I try and force CMake to use a different version, I get this error when building Cesium Native:

Error		CMake Error at C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\extern\CMakeLists.txt:3 (project):
  Generator

    Ninja

  does not support toolset specification, but toolset

    version=14.34

  was specified.	cesium	C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\extern\CMakeLists.txt	3		

For the current version of Cesium, what is the correct version of MSVC to use?

I forced UE to use Version 14.38.33130 and that fixed its build issues but I get the above error when I forced CMake to use this version.

Update - More weirdness:
So if I don’t override the version, the log says version 14.42.34433 is being used.

If I add -DCMAKE_GENERATOR_TOOLSET="version=14.42.34433" to the CMake Command Arguments in VS then the same error (Ninja does not support toolset specification) appears.

Is the command incorrect? Have I put it in the wrong place?

Hey @JKelly206, welcome to the community!

We’ve struggled with this exact problem ourselves, actually. What we had to do to get it working was:

  • Make sure that MSVC 14.38 was explicitly installed in Visual Studio’s components window.
  • Ensure that the extern folder has built with 14.38. I think we attempt to build with that version automatically, but it doesn’t hurt to check. You can find the version in build/CMakeCache.txt – if it’s incorrect, delete build and try again.
  • Edit BuildConfiguration.xml, which is found in %userprofile%\AppData\Roaming\Unreal Engine\UnrealBuildTool, to look like the below:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <BuildConfiguration>
		<!--<bUseUnityBuild>false</bUseUnityBuild>-->
    </BuildConfiguration>
	<SourceFileWorkingSet>
		<!-- <Provider>None</Provider> -->
	</SourceFileWorkingSet>
	<WindowsPlatform>
		<CompilerVersion>14.38.33130</CompilerVersion>
	</WindowsPlatform>
</Configuration>

You might also want to regenerate the project files just for sanity. Let us know how that goes!

Thanks for your response, unfortunately it seems impossible to ensure that MSVC 14.38 is the only version because removing the “latest” version in the VS Installer (which is 14.42) causes a load of other components to be uninstalled, including the CMake tools!

As mentioned in my previous post, I tried using the commandline argument -DCMAKE_GENERATOR_TOOLSET="version=14.38" to specify the correct version but it causes the CMake project generation to fail.

Hi @JKelly206,

I think there may have been a miscommunication. You don’t need only 14.38 to be installed – I also have 14.42 installed and use it for other Visual Studio projects.

For me, I use cmake -B build -S . -T version=14.38 from the command line. I’m not sure if -DCMAKE_GENERATOR_TOOLSET behaves differently, so could you try using -T instead? I’m also not sure if you need the quotation marks around version=14.38, but we’ll see if it complains.

Hi,

I tried using the commandline but was unable to get it to use the specified version, it kept using the latest. However I did find that I was able to get everything working by using CMake GUI and putting the version=14.38 argument under the Optional Toolset parameter in the Configure window and then following the process for generating the solution files for the libraries.

Thanks so much for the help, worked it out in the end!

1 Like

Thanks for the update @JKelly206! Sorry this was such a headache, but I’m glad you were able to figure it out :smile:

1 Like