Unresolved external symbol - Cannot find proper dependency module name (VS)

​Hi, I’m writing my own MeshMerger, but I have encounterd a problem:
when compiling I have 3 unresolved external symbols.

I have extracted problematic code:



int32 sourceMaxBoneInfluences = 3;
int32 vertexId = 0;
FSkeletalMeshLODRenderData* sourceLODData = new FSkeletalMeshLODRenderData;
//... initialise data
FSkeletalMeshLODRenderData* mergeLODData = new FSkeletalMeshLODRenderData;
TArray<FSkinWeightInfo> mergedSkinWeightBuffer;
FSkinWeightInfo weight;
weight = sourceLODData->GetSkinWeightVertexBuffer()->GetVertexSkinWeights(vertexId); // problematic line
mergedSkinWeightBuffer.Add(weight);
mergeLODData->SkinWeightVertexBuffer.SetMaxBoneInfluences(sourceMaxBoneInfluences); // problematic line
mergeLODData->SkinWeightVertexBuffer = mergedSkinWeightBuffer; // problematic line

If I remove/comment three last lines, there is no problem with compilation.

I got these errors from building my project:


Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: class FSkinWeightVertexBuffer & __cdecl FSkinWeightVertexBuffer:perator=(class TArray<struct FSkinWeightInfo,class TSizedDefaultAllocator<32> > const &)" (??4FSkinWeightVertexBuffer@@QEAAAEAV0@AEBV?$TArray@UFSkinWeightInfo@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z) referenced in function "public: void __cdecl USimpleSkeletalMeshMerger::MeshMerger::AlterVerticesByMorphTargets<struct TGPUSkinVertexFloat16Uvs<1> >(class TArray<struct TGPUSkinVertexFloat16Uvs<1>,class TSizedDefaultAllocator<32> > &,unsigned int,int,int,struct FSimpleSingleMeshMergeParams const &)" (??$AlterVerticesByMorphTargets@U?$TGPUSkinVertexFloat16Uvs@$00@@@MeshMerger@USimpleSkeletalMeshMerger@@QEAAXAEAV?$TArray@U?$TGPUSkinVertexFloat16Uvs@$00@@V?$TSizedDefaultAllocator@$0CA@@@@@IHHAEBUFSimpleSingleMeshMergeParams@@@Z) FantasyWorld C:\UnrealEngine4Projects\MMORPG\FantasyWorld\Intermediate\ProjectFiles\SimpleSkeletalMeshMerger.cpp.obj 1
Error LNK2019 unresolved external symbol "public: void __cdecl FSkinWeightDataVertexBuffer::SetMaxBoneInfluences(unsigned int)" (?SetMaxBoneInfluences@FSkinWeightDataVertexBuffer@@QEAAXI@Z) referenced in function "public: void __cdecl USimpleSkeletalMeshMerger::MeshMerger::AlterVerticesByMorphTargets<struct TGPUSkinVertexFloat16Uvs<1> >(class TArray<struct TGPUSkinVertexFloat16Uvs<1>,class TSizedDefaultAllocator<32> > &,unsigned int,int,int,struct FSimpleSingleMeshMergeParams const &)" (??$AlterVerticesByMorphTargets@U?$TGPUSkinVertexFloat16Uvs@$00@@@MeshMerger@USimpleSkeletalMeshMerger@@QEAAXAEAV?$TArray@U?$TGPUSkinVertexFloat16Uvs@$00@@V?$TSizedDefaultAllocator@$0CA@@@@@IHHAEBUFSimpleSingleMeshMergeParams@@@Z) FantasyWorld C:\UnrealEngine4Projects\MMORPG\FantasyWorld\Intermediate\ProjectFiles\SimpleSkeletalMeshMerger.cpp.obj 1
Error LNK2019 unresolved external symbol "public: struct FSkinWeightInfo __cdecl FSkinWeightVertexBuffer::GetVertexSkinWeights(unsigned int)const " (?GetVertexSkinWeights@FSkinWeightVertexBuffer@@QEBA?AUFSkinWeightInfo@@I@Z) referenced in function "public: void __cdecl USimpleSkeletalMeshMerger::MeshMerger::AlterVerticesByMorphTargets<struct TGPUSkinVertexFloat16Uvs<1> >(class TArray<struct TGPUSkinVertexFloat16Uvs<1>,class TSizedDefaultAllocator<32> > &,unsigned int,int,int,struct FSimpleSingleMeshMergeParams const &)" (??$AlterVerticesByMorphTargets@U?$TGPUSkinVertexFloat16Uvs@$00@@@MeshMerger@USimpleSkeletalMeshMerger@@QEAAXAEAV?$TArray@U?$TGPUSkinVertexFloat16Uvs@$00@@V?$TSizedDefaultAllocator@$0CA@@@@@IHHAEBUFSimpleSingleMeshMergeParams@@@Z) FantasyWorld C:\UnrealEngine4Projects\MMORPG\FantasyWorld\Intermediate\ProjectFiles\SimpleSkeletalMeshMerger.cpp.obj 1
Error LNK1120 3 unresolved externals FantasyWorld C:\UnrealEngine4Projects\MMORPG\FantasyWorld\Binaries\Win64\UE4Editor-FantasyWorld.dll 1
Error MSB3073 The command "C:\Programs\UnrealEngine\UE_4.25\Engine\Build\BatchFiles\Build.bat FantasyWorldEditor Win64 Development -Project="C:\UnrealEngine4Projects\MMORPG\FantasyWorld\FantasyWorld.uproject" -WaitMutex -FromMsBuild" exited with code 6. FantasyWorld C:\Programs\MSVS\Community2019\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 44

I have these line in my FantasyWorld.build.cs:


PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine",  "InputCore", "RHI", "RenderCore" });

Every​ class and method that I am using in this code example is in Core or Engine module so I have no idea where the problem is.

Thanks for help.