# Cesium for Unreal v2.7.0 Build Errors

**URL:** https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439
**Category:** Cesium for Unreal
**Created:** [July 1, 2024, 1:59pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439 "2024-07-01T13:59:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Thomas\_Ward](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/thomas_ward/32/15986_2.png) [@Thomas\_Ward](https://community.cesium.com/u/Thomas_Ward)
#### Post date: [July 1, 2024, 1:59pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/1 "2024-07-01T13:59:44Z")

</div>

I just upgraded to v2.7.0 from GitHub and I’m getting the following compile errors:

 ![Cesium for Unreal v2.7.0 Build Error](https://global.discourse-cdn.com/cesium/original/3X/b/e/be7b29562226dff2cf7e8f797de70d8cc4cf8314.png)

Unreal Engines says the project could not be compiled and wants me to compile manually.  
Visual Studio 2022 and JetBrains Rider both show the same errors.

---

<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: [July 2, 2024, 1:57am UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/2 "2024-07-02T01:57:49Z")

</div>

Hi @Thomas_Ward, sorry you’re having trouble with the new release. I’m curious why you need to build the plugin yourself, though. Is it because you’ve included it in your project, rather than as an Engine plugin? Or is it because you’re using a custom-built Unreal Engine?

In any case, as a quick fix, you can probably just add `#include "CesiumEllipsoid.h"` near the top of `CesiumGlobeAnchorComponent.h`. Unreal’s compilation model unfortunately makes it really easy for us to miss includes like this. We’re looking at ways to make it less likely in the future.

---

<div class="post-metadata">

### Author: ![Thomas\_Ward](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/thomas_ward/32/15986_2.png) [@Thomas\_Ward](https://community.cesium.com/u/Thomas_Ward)
#### Post date: [July 2, 2024, 3:02am UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/3 "2024-07-02T03:02:55Z")

</div>

@Kevin_Ring We copy the plugin into our project for source control reasons.

It is compiling fine now.

Thanks for your help, I really appreciate it.

---

<div class="post-metadata">

### Author: ![Grant\_Wilk](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/grant_wilk/32/19776_2.png) [@Grant\_Wilk](https://community.cesium.com/u/Grant_Wilk)
#### Post date: [July 8, 2024, 4:05pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/4 "2024-07-08T16:05:48Z")

</div>

Bumping this thread because I’m having a similar issue when installing the plugin from the GitHub distribution. Adding `#include "CesiumEllipsoid.h"` to `CesiumGlobeAnchorComponent.h` resolved most of the issues, but we’re still getting one below. This is in Unreal 5.3.2.

```auto
[1/4] Compile [x64] CesiumGlobeAnchorCustomization.cpp
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(239): error C2664: 'bool IsValid(const UObject *)': cannot convert argument 1 from 'ACesiumGeoreference *' to 'const UObject *'
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(239): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\toolchains\unreal\ue-5.3.2-release\Engine\Source\Runtime\CoreUObject\Public\UObject\Object.h(1771): note: see declaration of 'IsValid'
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(239): note: while trying to match the argument list '(ACesiumGeoreference *)'
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(278): error C2664: 'bool IsValid(const UObject *)': cannot convert argument 1 from 'ACesiumGeoreference *' to 'const UObject *'
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(278): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\toolchains\unreal\ue-5.3.2-release\Engine\Source\Runtime\CoreUObject\Public\UObject\Object.h(1771): note: see declaration of 'IsValid'
C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(278): note: while trying to match the argument list '(ACesiumGeoreference *)'

```

Any ideas what could be causing this? @Thomas_Ward did you do anything else to get it compiling?

EDIT:  
I was able to get it compiling by changing the `IsValid()` checks on lines 239 and 278 of `CesiumGlobeAnchorCustomization.cpp` to `!= nullptr` instead. I can’t guarantee this will deliver the exact same behavior, but it is at least adjacent.

e.g.

```auto
// original code
if (IsValid(this->GlobeAnchor->ResolveGeoreference())) {
    // ... blah blah
}

// modified code
if (this->GlobeAnchor->ResolveGeoreference() != nullptr) {
    // ... blah blah
}

```

---

<div class="post-metadata">

### Author: ![Brian\_Langevin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/brian_langevin/32/14490_2.png) [@Brian\_Langevin](https://community.cesium.com/u/Brian_Langevin)
#### Post date: [July 8, 2024, 5:02pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/5 "2024-07-08T17:02:12Z")

</div>

> [@Grant\_Wilk](#):
>
> `CesiumGlobeAnchorCustomization.cpp`

> [@Grant\_Wilk](#):
>
> ```auto
> C:\path\to\project\Plugins\CesiumForUnreal\Source\CesiumEditor\Private\CesiumGlobeAnchorCustomization.cpp(239): error C2664: 'bool IsValid(const UObject *)': cannot convert argument 1 from 'ACesiumGeoreference *' to 'const UObject *'
> 
> ```

I can actually see MSVS Intellisense flagging this as well, although it builds fine.

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

If I put `#include "CesiumGeoreference.h"` at the top of `CesiumGlobeAnchorCustomization.cpp`, the squiggles go away.

Another header include order issue I’m guessing.

---

<div class="post-metadata">

### Author: ![Brian\_Langevin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/brian_langevin/32/14490_2.png) [@Brian\_Langevin](https://community.cesium.com/u/Brian_Langevin)
#### Post date: [July 8, 2024, 5:21pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/6 "2024-07-08T17:21:14Z")

</div>

[Pull request created](https://github.com/CesiumGS/cesium-unreal/pull/1476). I’ll verify 5.3.2 builds here.

---

<div class="post-metadata">

### Author: ![Thomas\_Ward](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/thomas_ward/32/15986_2.png) [@Thomas\_Ward](https://community.cesium.com/u/Thomas_Ward)
#### Post date: [July 8, 2024, 8:59pm UTC](https://community.cesium.com/t/cesium-for-unreal-v2-7-0-build-errors/33439/7 "2024-07-08T20:59:11Z")

</div>

Putting `#include "CesiumGeoreference.h"` at the top of `CesiumGlobeAnchorCustomization.cpp` only fixed the issue on my home machine, but I was still getting errors on my work computer. I’m still not sure why…

Adding the changes from these two pull requests fixed the compile errors on my work machine:

[Merge pull request #1471 from CesiumGS/added-ufunction-to-getellipsoid · CesiumGS/cesium-unreal@c007fc7 (github.com)](https://github.com/CesiumGS/cesium-unreal/commit/c007fc72dcab9870260e669b811251e65928711e#diff-0542a9a12fd88db59682ba03c1aefab68199b9fc8abe0196c5806e731f450776)

[Add missing include · CesiumGS/cesium-unreal@2a06200 (github.com)](https://github.com/CesiumGS/cesium-unreal/commit/2a0620034642720ea1790bcc7773606712c67fbf)
