Build errors: migrating from Cesium 1.6.3 to 1.7.0 for ue4.26

Migrating from

v1.6.3

to v1.7.0 - 2021-11-01

resulted into various errors . Any idea ?

CesiumGlobeAnchorComponent.cpp(62): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(62): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(62): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(92): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(92): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(92): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(131): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(131): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(131): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(207): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(207): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(207): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(228): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(228): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(228): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(266): [C2664] ‘bool IsValid(const UObject *)’: cannot convert argument 1 from ‘const UWorld *’ to ‘const UObject *’
CesiumGlobeAnchorComponent.cpp(266): [C2664] Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Object.h(1543): [C2664] see declaration of ‘IsValid’
CesiumGlobeAnchorComponent.cpp(267): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(267): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(267): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(278): [C2027] use of undefined type ‘UWorld’
ActorComponent.h(25): [C2027] see declaration of ‘UWorld’
CesiumGlobeAnchorComponent.cpp(277): [C2737] ‘oldWorldOriginLocation’: const object must be initialized
CesiumGlobeAnchorComponent.cpp(345): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(345): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(345): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(382): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(382): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(382): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(405): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(405): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(405): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(471): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(471): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(471): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(483): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(483): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(483): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(494): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(494): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(494): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(535): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(535): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(535): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(545): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(545): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(545): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(555): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(555): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(555): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(687): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(687): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(687): [C2065] ‘LogCesium’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(712): [C2653] ‘FLogCategoryLogCesium’: is not a class or namespace name
CesiumGlobeAnchorComponent.cpp(712): [C2065] ‘CompileTimeVerbosity’: undeclared identifier
CesiumGlobeAnchorComponent.cpp(712): [C2065] ‘LogCesium’: undeclared identifier
Microsoft.MakeFile.targets(45, 5): [MSB3073] The command ““C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat” AdvancedFrameworkVREditor Win64 Development -Project=“C:\UnrealProjects\advancedvrframeworktemplate\AdvancedFrameworkVR.uproject” -WaitMutex -FromMsBuild” exited with code 6.

In 1.7, you have new categories of logs that seem that are not working when the plugin is moved from the Engine inside to the Unreal project. See related issue. I am trying to find a remedy.

Hi @jimver04,

Those log categories aren’t new, but it seems in v1.7 we may be missing a #include "CesiumRuntime.h" in CesiumGlobeAnchorComponent.cpp that is required in some scenarios. Can you try adding it and see if that fixes the problem?

Thanks,
Kevin

Now I get

CesiumGlobeAnchorComponent.cpp(268): [C2664] ‘bool IsValid(const UObject *)’: cannot convert argument 1 from ‘const UWorld *’ to ‘const UObject *’

267  const UWorld* pWorld = this->GetWorld();
268  if (!IsValid(pWorld)) {
269    UE_LOG(
        LogCesium,
        Warning,
        TEXT("CesiumGlobeAnchorComponent %s is not spawned in world"),
        *this->GetName());
    return;
  }

Remedy

267 const UWorld* pWorld = this->GetWorld();
268 const UObject* objPWorld = Cast<UObject>(pWorld);	
269 if (!IsValid(objPWorld)) {

Another error
CesiumGlobeAnchorComponent.cpp(283): [C2027] use of undefined type ‘UWorld’

It regards pWorld as it underlined by red in Rider

282  const glm::dvec3 oldWorldOriginLocation =
283      VecMath::createVector3D(pWorld->OriginLocation);

Remedy:
added this

#include “Engine/World.h”
in CesiumGlobeAnchorComponent.cpp
This also remedies the previous error. Casting was removed.

Now I get these:

  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &,struct glm::vec<3,double,0> const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@AEBU?$vec@$02N$0A@@3@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateTilesetToUnrealRelativeWorldTransform(void)" (?_updateTilesetToUnrealRelativeWorldTransform@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateAbsoluteLocation(void)" (?_updateAbsoluteLocation@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::add3D(struct FIntVector const &,struct FVector const &)" (?add3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@AEBUFVector@@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateAbsoluteLocation(void)" (?_updateAbsoluteLocation@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::subtract3D(struct FIntVector const &,struct FVector const &)" (?subtract3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@AEBUFVector@@@Z) referenced in function "public: virtual void __cdecl UCesium3DTilesetRoot::ApplyWorldOffset(struct FVector const &,bool)" (?ApplyWorldOffset@UCesium3DTilesetRoot@@UEAAXAEBUFVector@@_N@Z)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &,struct glm::vec<4,double,0> const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@AEBU?$vec@$03N$0A@@3@@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createTranslationMatrix4D(double,double,double,double)" (?createTranslationMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@NNNN@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z) referenced in function "public: struct FVector __cdecl ACesiumGeoreference::InaccurateTransformEcefToUnreal(struct FVector const &)const " (?InaccurateTransformEcefToUnreal@ACesiumGeoreference@@QEBA?AUFVector@@AEBU2@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::qua<double,0> __cdecl VecMath::createQuaternion(struct FQuat const &)" (?createQuaternion@VecMath@@SA?AU?$qua@N$0A@@glm@@AEBUFQuat@@@Z) referenced in function "public: struct FRotator __cdecl ACesiumGeoreference::InaccurateTransformRotatorEastNorthUpToUnreal(struct FRotator const &,struct FVector const &)const " (?InaccurateTransformRotatorEastNorthUpToUnreal@ACesiumGeoreference@@QEBA?AUFRotator@@AEBU2@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::qua<double,0> __cdecl VecMath::createQuaternion(struct FQuat const &)" (?createQuaternion@VecMath@@SA?AU?$qua@N$0A@@glm@@AEBUFQuat@@@Z)
  unresolved external symbol "public: static struct FMatrix __cdecl VecMath::createMatrix(struct glm::mat<3,3,double,0> const &)" (?createMatrix@VecMath@@SA?AUFMatrix@@AEBU?$mat@$02$02N$0A@@glm@@@Z) referenced in function "public: struct FMatrix __cdecl ACesiumGeoreference::InaccurateComputeEastNorthUpToEcef(struct FVector const &)const " (?InaccurateComputeEastNorthUpToEcef@ACesiumGeoreference@@QEBA?AUFMatrix@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct FRotator __cdecl VecMath::createRotator(struct glm::qua<double,0> const &)" (?createRotator@VecMath@@SA?AUFRotator@@AEBU?$qua@N$0A@@glm@@@Z) referenced in function "public: struct FRotator __cdecl ACesiumGeoreference::InaccurateTransformRotatorEastNorthUpToUnreal(struct FRotator const &,struct FVector const &)const " (?InaccurateTransformRotatorEastNorthUpToUnreal@ACesiumGeoreference@@QEBA?AUFRotator@@AEBU2@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<4,double,0> __cdecl VecMath::add4D(struct FVector const &,struct FIntVector const &)" (?add4D@VecMath@@SA?AU?$vec@$03N$0A@@glm@@AEBUFVector@@AEBUFIntVector@@@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@@Z) referenced in function "private: struct glm::mat<4,4,double,0> const & __cdecl UCesiumGlobeAnchorComponent::_updateGlobeTransformFromActorTransform(void)" (?_updateGlobeTransformFromActorTransform@UCesiumGlobeAnchorComponent@@AEAAAEBU?$mat@$03$03N$0A@@glm@@XZ)
  unresolved external symbol "public: static struct FMatrix __cdecl VecMath::createMatrix(struct glm::mat<4,4,double,0> const &)" (?createMatrix@VecMath@@SA?AUFMatrix@@AEBU?$mat@$03$03N$0A@@glm@@@Z) referenced in function "private: struct FTransform __cdecl UCesiumGlobeAnchorComponent::_updateActorTransformFromGlobeTransform(class std::optional<struct glm::vec<3,double,0> > const &)" (?_updateActorTransformFromGlobeTransform@UCesiumGlobeAnchorComponent@@AEAA?AUFTransform@@AEBV?$optional@U?$vec@$02N$0A@@glm@@@std@@@Z)
  unresolved external symbol "public: static struct FQuat __cdecl VecMath::createQuaternion(struct glm::qua<double,0> const &)" (?createQuaternion@VecMath@@SA?AUFQuat@@AEBU?$qua@N$0A@@glm@@@Z) referenced in function "private: void __cdecl UCesiumGlobeAnchorComponent::_onActorTransformChanged(class USceneComponent *,enum EUpdateTransformFlags,enum ETeleportType)" (?_onActorTransformChanged@UCesiumGlobeAnchorComponent@@AEAAXPEAVUSceneComponent@@W4EUpdateTransformFlags@@W4ETeleportType@@@Z)
  14 unresolved externals
  Microsoft.MakeFile.targets(45, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" AdvancedFrameworkVREditor Win64 Development -Project="C:\UnrealProjects\advancedvrframeworktemplate\AdvancedFrameworkVR.uproject" -WaitMutex -FromMsBuild" exited with code 6.

I think that’s caused by VecMath being a private type that isn’t exported outside of the CesiumRuntime plugin. Are you trying to use VecMath directly? Or have you included some Cesium code in your own plugin/app that uses VecMath? It should be fine to use UCesiumGlobeAnchorComponent, for example, but if you include the CPP file in your own project you may run into issues like this.

I haven’t added any code myself yet. I just move CesiumForUnreal from the original Engine/Plugins/Marketplace into myProject/Plugins

It is a procedure that I did for 1.6.3 and it was working fine. There are some code shifting in the new Cesium version without including the necessary header files.

I added some but not finished yet

#include <glm/gtc/matrix_inverse.hpp>
#include <glm/vec3.hpp>
#include <glm/mat4x4.hpp>
#include <glm/mat4x2.hpp>

We put the plugin a project\Plugins directory and build it with the project in the course of our normal development, and we haven’t seen those errors. So I’m not sure what might be different in your environment. It sounds like you’re making progress, though, so let us know how you go. We’re happy to take a pull request to add missing #includes.

You are right. The problem is more complicated as I thought because by including “CesiumRuntime.h” in the header I have lost all the glm libraries. I should call something else instead of “CesiumRuntime.h” in CesiumGlobeAnchorComponent.cpp

The problem is focused now on the headers of two files :

Cesium3DTilesetRoot.cpp

#include "Cesium3DTilesetRoot.h"
#include "Cesium3DTileset.h"
#include "CesiumUtility/Math.h"
#include "Engine/World.h"
#include "VecMath.h"

and

CesiumGlobeAnchorComponent.cpp

#include "CesiumGlobeAnchorComponent.h"
#include "CesiumActors.h"
#include "CesiumCustomVersion.h"
#include "CesiumGeoreference.h"
#include "CesiumTransforms.h"
#include "Components/SceneComponent.h"
#include "GameFramework/Actor.h"
#include "VecMath.h"
#include <glm/gtx/matrix_decompose.hpp>
#include "CesiumRuntime.h"
#include "Engine/World.h"

Errors with the above headers:

  Cesium3DTilesetRoot.cpp(33): [C2653] 'FLogCategoryLogCesium': is not a class or namespace name
  Cesium3DTilesetRoot.cpp(33): [C2065] 'CompileTimeVerbosity': undeclared identifier
  Cesium3DTilesetRoot.cpp(33): [C2065] 'LogCesium': undeclared identifier
  Microsoft.MakeFile.targets(45, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" AdvancedFrameworkVREditor Win64 Development -Project="C:\UnrealProjects\advancedvrframeworktemplate\AdvancedFrameworkVR.uproject" -WaitMutex -FromMsBuild" exited with code 6.

If I include “CesiumRuntime.h” also in Cesium3DTilesetRoot file I have lost all the glm libraries

  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &,struct glm::vec<3,double,0> const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@AEBU?$vec@$02N$0A@@3@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateTilesetToUnrealRelativeWorldTransform(void)" (?_updateTilesetToUnrealRelativeWorldTransform@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateAbsoluteLocation(void)" (?_updateAbsoluteLocation@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FIntVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::add3D(struct FIntVector const &,struct FVector const &)" (?add3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@AEBUFVector@@@Z) referenced in function "private: void __cdecl UCesium3DTilesetRoot::_updateAbsoluteLocation(void)" (?_updateAbsoluteLocation@UCesium3DTilesetRoot@@AEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::subtract3D(struct FIntVector const &,struct FVector const &)" (?subtract3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFIntVector@@AEBUFVector@@@Z) referenced in function "public: virtual void __cdecl UCesium3DTilesetRoot::ApplyWorldOffset(struct FVector const &,bool)" (?ApplyWorldOffset@UCesium3DTilesetRoot@@UEAAXAEBUFVector@@_N@Z)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &,struct glm::vec<4,double,0> const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@AEBU?$vec@$03N$0A@@3@@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createTranslationMatrix4D(double,double,double,double)" (?createTranslationMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@NNNN@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z) referenced in function "public: struct FVector __cdecl ACesiumGeoreference::InaccurateTransformEcefToUnreal(struct FVector const &)const " (?InaccurateTransformEcefToUnreal@ACesiumGeoreference@@QEBA?AUFVector@@AEBU2@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<3,double,0> __cdecl VecMath::createVector3D(struct FVector const &)" (?createVector3D@VecMath@@SA?AU?$vec@$02N$0A@@glm@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::qua<double,0> __cdecl VecMath::createQuaternion(struct FQuat const &)" (?createQuaternion@VecMath@@SA?AU?$qua@N$0A@@glm@@AEBUFQuat@@@Z) referenced in function "public: struct FRotator __cdecl ACesiumGeoreference::InaccurateTransformRotatorEastNorthUpToUnreal(struct FRotator const &,struct FVector const &)const " (?InaccurateTransformRotatorEastNorthUpToUnreal@ACesiumGeoreference@@QEBA?AUFRotator@@AEBU2@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::qua<double,0> __cdecl VecMath::createQuaternion(struct FQuat const &)" (?createQuaternion@VecMath@@SA?AU?$qua@N$0A@@glm@@AEBUFQuat@@@Z)
  unresolved external symbol "public: static struct FMatrix __cdecl VecMath::createMatrix(struct glm::mat<3,3,double,0> const &)" (?createMatrix@VecMath@@SA?AUFMatrix@@AEBU?$mat@$02$02N$0A@@glm@@@Z) referenced in function "public: struct FMatrix __cdecl ACesiumGeoreference::InaccurateComputeEastNorthUpToEcef(struct FVector const &)const " (?InaccurateComputeEastNorthUpToEcef@ACesiumGeoreference@@QEBA?AUFMatrix@@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct FRotator __cdecl VecMath::createRotator(struct glm::qua<double,0> const &)" (?createRotator@VecMath@@SA?AUFRotator@@AEBU?$qua@N$0A@@glm@@@Z) referenced in function "public: struct FRotator __cdecl ACesiumGeoreference::InaccurateTransformRotatorEastNorthUpToUnreal(struct FRotator const &,struct FVector const &)const " (?InaccurateTransformRotatorEastNorthUpToUnreal@ACesiumGeoreference@@QEBA?AUFRotator@@AEBU2@AEBUFVector@@@Z)
  unresolved external symbol "public: static struct glm::vec<4,double,0> __cdecl VecMath::add4D(struct FVector const &,struct FIntVector const &)" (?add4D@VecMath@@SA?AU?$vec@$03N$0A@@glm@@AEBUFVector@@AEBUFIntVector@@@Z) referenced in function "public: void __cdecl ACesiumGeoreference::PlaceGeoreferenceOriginHere(void)" (?PlaceGeoreferenceOriginHere@ACesiumGeoreference@@QEAAXXZ)
  unresolved external symbol "public: static struct glm::mat<4,4,double,0> __cdecl VecMath::createMatrix4D(struct FMatrix const &)" (?createMatrix4D@VecMath@@SA?AU?$mat@$03$03N$0A@@glm@@AEBUFMatrix@@@Z) referenced in function "private: struct glm::mat<4,4,double,0> const & __cdecl UCesiumGlobeAnchorComponent::_updateGlobeTransformFromActorTransform(void)" (?_updateGlobeTransformFromActorTransform@UCesiumGlobeAnchorComponent@@AEAAAEBU?$mat@$03$03N$0A@@glm@@XZ)
  unresolved external symbol "public: static struct FMatrix __cdecl VecMath::createMatrix(struct glm::mat<4,4,double,0> const &)" (?createMatrix@VecMath@@SA?AUFMatrix@@AEBU?$mat@$03$03N$0A@@glm@@@Z) referenced in function "private: struct FTransform __cdecl UCesiumGlobeAnchorComponent::_updateActorTransformFromGlobeTransform(class std::optional<struct glm::vec<3,double,0> > const &)" (?_updateActorTransformFromGlobeTransform@UCesiumGlobeAnchorComponent@@AEAA?AUFTransform@@AEBV?$optional@U?$vec@$02N$0A@@glm@@@std@@@Z)
  unresolved external symbol "public: static struct FQuat __cdecl VecMath::createQuaternion(struct glm::qua<double,0> const &)" (?createQuaternion@VecMath@@SA?AUFQuat@@AEBU?$qua@N$0A@@glm@@@Z) referenced in function "private: void __cdecl UCesiumGlobeAnchorComponent::_onActorTransformChanged(class USceneComponent *,enum EUpdateTransformFlags,enum ETeleportType)" (?_onActorTransformChanged@UCesiumGlobeAnchorComponent@@AEAAXPEAVUSceneComponent@@W4EUpdateTransformFlags@@W4ETeleportType@@@Z)
  14 unresolved externals
  Microsoft.MakeFile.targets(45, 5): [MSB3073] The command ""C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" AdvancedFrameworkVREditor Win64 Development -Project="C:\UnrealProjects\advancedvrframeworktemplate\AdvancedFrameworkVR.uproject" -WaitMutex -FromMsBuild" exited with code 6.

Those symbols are all in VecMath.cpp. I can’t think of why they would be unresolved as long as that file is in the project as well.

In 1.6.3 you call CesiumRuntime.h in the following files

in 1.7.0 I have it

So the comparison may give the solution

I have added in the header files of TilesetRoot and GlobeActorComponent

DECLARE_LOG_CATEGORY_EXTERN(LogCesium2, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogCesium3, Log, All);

and changed the ULog tags and the related errors dissappear.

But the glm errors appear. So I guess adding CesiumRuntime.h in the header is right. It is just a precompile error. So indeed the glm libraries are missing. The glms with the Ulogs are irrelevant errors. It is just progressing in the compile.

I don’t think including CesiumRuntime.h is causing those errors. Rather, it’s fixing all the compiler errors so that you actually get to the linking step, at which point you see those VecMath unresolved symbol linker errors.

1 Like

I can not find the necessary library for

glm:mat4<4,4,double,0>

I have tried
#include <glm/mat4x4.hpp>
#include <glm/ext/matrix_double4x4.hpp>
#include <glm/ext/matrix_double4x4_precision.hpp>

Right, you’re not missing anything GLM related, though. You’re missing the implementation of VecMath functions, which happen to return GLM types. Scroll a bit more to the right in the error message. The implementations are in VecMath.cpp, you just need to figure out why it’s not finding them.