# Cesium for unreal v2.7.1 Source code compilation error

**URL:** <https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406>\
**Category:** Cesium for Unreal\
**Created:** [August 8, 2024, 12:47pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406 "2024-08-08T12:47:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![a5198945741](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/a5198945741/32/22762_2.png) [@a5198945741](https://community.cesium.com/u/a5198945741)\
**Post date:** [August 8, 2024, 12:47pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/1 "2024-08-08T12:47:52Z")

</div>

![image](https://global.discourse-cdn.com/cesium/original/3X/a/3/a3717668a2a6743b5197717822b11aa754fb5493.png)  
 ![image](https://global.discourse-cdn.com/cesium/original/3X/1/3/13d82cadc598eedb8dc98d8efb900e9eda0e9e19.png)  
Why?

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [August 9, 2024, 3:28am UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/2 "2024-08-09T03:28:37Z")

</div>

See here:

> [@Tile Rendering and Seamless Flying in Multiplayer Environment](https://community.cesium.com/t/tile-rendering-and-seamless-flying-in-multiplayer-environment/33712/14):
>
> CesiumIonClient.lib(Connection.obj) : error LNK2019: unresolved external symbol \_Thrd\_sleep\_for referenced in function “void \_\_cdecl std::this\_thread::sleep\_for\<\_\_int64,struct std::ratio\<1,1000\> \>(class std::chrono::duration\<\_\_int64,struct std::ratio\<1,1000\> \> const &)” (??$sleep\_for@\_JU?$ratio@$00$0DOI@@std@@@this\_thread@std@@YAXAEBV?$duration@\_JU?$ratio@$00$0DOI@@std@@@chrono@1@@Z) I just happened to run into this myself. In my case, it was caused by having the “MSVC v143 - VS2022 C++ x64/x…

---

<div class="post-metadata">

**Author:** ![a5198945741](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/a5198945741/32/22762_2.png) [@a5198945741](https://community.cesium.com/u/a5198945741)\
**Post date:** [August 9, 2024, 8:44am UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/3 "2024-08-09T08:44:37Z")

</div>

It’s settled. Thank you

---

<div class="post-metadata">

**Author:** ![JKelly206](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jkelly206/32/8523_2.png) [@JKelly206](https://community.cesium.com/u/JKelly206)\
**Post date:** [January 30, 2025, 12:38pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/4 "2025-01-30T12:38:50Z")

</div>

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:

```auto
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.

 ![devenv_vFcZ7RUfLZ](https://global.discourse-cdn.com/cesium/original/3X/7/3/730a0580f5ada33c5d24a566f0b4e5e55e5f4e68.png)

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?

 ![image](https://global.discourse-cdn.com/cesium/original/3X/0/9/094f62ce335cd8afa8bea45903db91903db3ab71.png)

---

<div class="post-metadata">

**Author:** ![janine](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/janine/32/5135_2.png) [@janine](https://community.cesium.com/u/janine)\
**Post date:** [January 31, 2025, 5:23pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/5 "2025-01-31T17:23:56Z")

</div>

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:

```auto
<?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!

---

<div class="post-metadata">

**Author:** ![JKelly206](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jkelly206/32/8523_2.png) [@JKelly206](https://community.cesium.com/u/JKelly206)\
**Post date:** [February 4, 2025, 2:57pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/6 "2025-02-04T14:57:21Z")

</div>

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!

 ![image](https://global.discourse-cdn.com/cesium/original/3X/b/6/b664cb739000578466feeaacc8858161b9777289.png)

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.

 ![image](https://global.discourse-cdn.com/cesium/original/3X/0/1/0180cf0befbdccdb81b096078091582844d33ec4.png)

---

<div class="post-metadata">

**Author:** ![janine](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/janine/32/5135_2.png) [@janine](https://community.cesium.com/u/janine)\
**Post date:** [February 5, 2025, 3:47pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/7 "2025-02-05T15:47:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JKelly206](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jkelly206/32/8523_2.png) [@JKelly206](https://community.cesium.com/u/JKelly206)\
**Post date:** [February 5, 2025, 4:02pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/8 "2025-02-05T16:02:28Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![janine](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/janine/32/5135_2.png) [@janine](https://community.cesium.com/u/janine)\
**Post date:** [February 5, 2025, 4:17pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-1-source-code-compilation-error/34406/9 "2025-02-05T16:17:23Z")

</div>

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