UObjectLibrary subclass explodes with 13 'unresolved externals'

Hello,
I’m trying to create a subclass of UObjectLibrary and with an entirely empty class, I immediately get a compiler error listing 13 ‘unresolved externals’
I know this is typically due to things like declaring but not defining a function, bad includes, etc. but I tried overriding each function listed and still nothing.

I’ve added “AssetRegistry” to my public dependency modules but that didn’t help.

SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@UObjectLibrary@@UEAAXAEAUFPropertyChangedEvent@@@Z) referenced in function "public: virtual void __cdecl USnapObjectLibrary::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@USnapObjectLibrary@@UEAAXAEAUFPropertyChangedEvent@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::PostLoad(void)" (?PostLoad@UObjectLibrary@@UEAAXXZ) referenced in function "public: virtual void __cdecl USnapObjectLibrary::PostLoad(void)" (?PostLoad@USnapObjectLibrary@@UEAAXXZ)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::UseWeakReferences(bool)" (?UseWeakReferences@UObjectLibrary@@UEAAX_N@Z) referenced in function "public: virtual void __cdecl USnapObjectLibrary::UseWeakReferences(bool)" (?UseWeakReferences@USnapObjectLibrary@@UEAAX_N@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual bool __cdecl UObjectLibrary::AddObject(class UObject *)" (?AddObject@UObjectLibrary@@UEAA_NPEAVUObject@@@Z) referenced in function "public: virtual bool __cdecl USnapObjectLibrary::AddObject(class UObject *)" (?AddObject@USnapObjectLibrary@@UEAA_NPEAVUObject@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual bool __cdecl UObjectLibrary::RemoveObject(class UObject *)" (?RemoveObject@UObjectLibrary@@UEAA_NPEAVUObject@@@Z) referenced in function "public: virtual bool __cdecl USnapObjectLibrary::RemoveObject(class UObject *)" (?RemoveObject@USnapObjectLibrary@@UEAA_NPEAVUObject@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::GetAssetDataList(class TArray<struct FAssetData,class TSizedDefaultAllocator<32> > &)" (?GetAssetDataList@UObjectLibrary@@UEAAXAEAV?$TArray@UFAssetData@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z) referenced in function "public: virtual void __cdecl USnapObjectLibrary::GetAssetDataList(class TArray<struct FAssetData,class TSizedDefaultAllocator<32> > &)" (?GetAssetDataList@USnapObjectLibrary@@UEAAXAEAV?$TArray@UFAssetData@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::ClearLoaded(void)" (?ClearLoaded@UObjectLibrary@@UEAAXXZ) referenced in function "public: virtual void __cdecl USnapObjectLibrary::ClearLoaded(void)" (?ClearLoaded@USnapObjectLibrary@@UEAAXXZ)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual int __cdecl UObjectLibrary::LoadAssetsFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &)" (?LoadAssetsFromPaths@UObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z) referenced in function "public: virtual int __cdecl USnapObjectLibrary::LoadAssetsFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &)" (?LoadAssetsFromPaths@USnapObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual int __cdecl UObjectLibrary::LoadBlueprintsFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &)" (?LoadBlueprintsFromPaths@UObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z) referenced in function "public: virtual int __cdecl USnapObjectLibrary::LoadBlueprintsFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &)" (?LoadBlueprintsFromPaths@USnapObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual int __cdecl UObjectLibrary::LoadAssetDataFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &,bool)" (?LoadAssetDataFromPaths@UObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@_N@Z) referenced in function "public: virtual int __cdecl USnapObjectLibrary::LoadAssetDataFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &,bool)" (?LoadAssetDataFromPaths@USnapObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@_N@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual int __cdecl UObjectLibrary::LoadBlueprintAssetDataFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &,bool)" (?LoadBlueprintAssetDataFromPaths@UObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@_N@Z) referenced in function "public: virtual int __cdecl USnapObjectLibrary::LoadBlueprintAssetDataFromPaths(class TArray<class FString,class TSizedDefaultAllocator<32> > const &,bool)" (?LoadBlueprintAssetDataFromPaths@USnapObjectLibrary@@UEAAHAEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@_N@Z)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual int __cdecl UObjectLibrary::LoadAssetsFromAssetData(void)" (?LoadAssetsFromAssetData@UObjectLibrary@@UEAAHXZ) referenced in function "public: virtual int __cdecl USnapObjectLibrary::LoadAssetsFromAssetData(void)" (?LoadAssetsFromAssetData@USnapObjectLibrary@@UEAAHXZ)
SnapObjectLibrary.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl UObjectLibrary::OnAssetRegistryFilesLoaded(void)" (?OnAssetRegistryFilesLoaded@UObjectLibrary@@UEAAXXZ) referenced in function "public: virtual void __cdecl USnapObjectLibrary::OnAssetRegistryFilesLoaded(void)" (?OnAssetRegistryFilesLoaded@USnapObjectLibrary@@UEAAXXZ)
C:\Unreal Projects\Snap\Binaries\Win64\UnrealEditor-Snap.dll : fatal error LNK1120: 13 unresolved externals

I can’t seem to find anyone else having this issue, it’s a brand new project too

Thanks!

Looks like that class is not meant to be subclassed.

It is marked with MinimalAPI, so only Cast can be used, and methods marked with ENGINE_API.

It looks like you’re supposed to use its functionality as-is.

Apparently that class is being deprecated so maybe that’s the reason it’s not properly exposed (anymore?)

There is now a better version of this functionality in AssetManager, if you are creating many game-specific libraries you should switch to using AssetManager instead

If you really want it, you’ll have to setup engine source and modify that file to remove MinimalAPI, and maybe also add ENGINE_API on the class.

Huh, I must have been looking at old docs then. Thank you for the explanation!