Cannot compile plugin in UE 5.3 (Unresolved Externals)

Hello.

I have a plugin I made back in 5.1. For 5.2 it compiled fine but when I went to compile it for 5.3 I got (Editor) compiler errors. Runtime compiles fine.

I think it has something to do with removal of “IsAvailable” as a singleton access. Or maybe it is something else, I am really not sure. I think I might be missing a dependency in the build.cs? Or did I made a mistake when fixing deprecated code.

I did add MaterialDomain.h for (MD_Surface) and “Materials/MaterialRenderProxy.h”.

Errors are:

11>Module.LevelGeneratorEditor.4.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl FViewport::FHitProxyMap::AddHitProxy(class HHitProxy *)" (?AddHitProxy@FHitProxyMap@FViewport@@UEAAXPEAVHHitProxy@@@Z)
11>Module.LevelGeneratorEditor.5.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl FViewport::FHitProxyMap::AddHitProxy(class HHitProxy *)" (?AddHitProxy@FHitProxyMap@FViewport@@UEAAXPEAVHHitProxy@@@Z)
11>Module.LevelGeneratorEditor.4.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl FViewport::FHitProxyMap::AddReferencedObjects(class FReferenceCollector &)" (?AddReferencedObjects@FHitProxyMap@FViewport@@UEAAXAEAVFReferenceCollector@@@Z)
11>Module.LevelGeneratorEditor.5.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl FViewport::FHitProxyMap::AddReferencedObjects(class FReferenceCollector &)" (?AddReferencedObjects@FHitProxyMap@FViewport@@UEAAXAEAVFReferenceCollector@@@Z)
11>Module.LevelGeneratorEditor.4.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl FViewport::FHitProxyMap::GetReferencerName(void)const " (?GetReferencerName@FHitProxyMap@FViewport@@UEBA?AVFString@@XZ)
11>Module.LevelGeneratorEditor.5.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class FString __cdecl FViewport::FHitProxyMap::GetReferencerName(void)const " (?GetReferencerName@FHitProxyMap@FViewport@@UEBA?AVFString@@XZ)

Any help would be appreciated, Thanks.

1 Like

Probably you are dealing with FSceneViewport problem I had the same issue moving from 5.1 to 5.3 version. Do you have inherited own version of mentioned class ?

The runtime build process uses static linking into a single .exe.
The editor build process uses dynamic linking into multiple .dll files which are mounted as plugins are loaded.

This means, when compiling for a runtime build you can get away with missing references in your Build.cs file which is not the case for editor builds.

Go iterate over the errors you are getting, based on a quick scan this is what I found:

  • FViewport::FHitProxyMap::AddHitProxy needs the "Engine" reference
  • FViewport::FHitProxyMap::AddReferencedObjects needs the "Engine" and "CoreUObject" references
  • FViewport::FHitProxyMap::GetReferencerName needs the "Engine" and "CoreUObject" references

So adding both "Engine" and "CoreUObject" to this module’s Build.cs file should fix all errors.

Otherwise we will need a sample code to dig deeper into this.

Have you ever solved this?

Just leaving this here, may help:
I made my own classes deriving from FSceneViewport and UGameViewportClient and had the exact same issue, even tho Engine and CoreUObject was added to dependencies.

After removing the my project API macro from my classes it compiled fine.