Compilation errors when trying to recompile default engine plugins

Using UE4.27 and UE5 I’ve met the same problem twice now - I’m trying to recompile default engine plugin AlembicImporter by copying it from “Plugins” in the engine folder to my project’s “Plugins” folder. I’ve made all precautions like copying all other plugins that depend on the plugin I’m trying to recompile and yet I get a lot “unresolved external symbol” compiling errors.

What helped is to copy the same plugin folder AlembicImporter from github https://github.com/EpicGames/UnrealEngine to my project and it compiled just fine. I had similar experience with compiling Eugen library.

Turned out the original plugin from engine folder is missing all “private” cpp files and that’s why it results in errors (you can see it in diffcheck below).

My question is - any ideas why it’s missing the necessary for compiling cpp files - is it a bug or is it a feature?

Error log:

Error   LNK2019 unresolved external symbol "public: __cdecl UAbcImportSettings::UAbcImportSettings(class FObjectInitializer const &)" (??0UAbcImportSettings@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "public: void __cdecl UAbcImportSettings::`default constructor closure'(void)" (??_FUAbcImportSettings@@QEAAXXZ)  cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AbcAssetImportData.gen.cpp.obj  1   
Error   LNK2001 unresolved external symbol "public: __cdecl UAbcImportSettings::UAbcImportSettings(class FObjectInitializer const &)" (??0UAbcImportSettings@@QEAA@AEBVFObjectInitializer@@@Z)  cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AbcImportSettings.gen.cpp.obj   1   
Error   LNK2019 unresolved external symbol "public: __cdecl UAbcAssetImportData::UAbcAssetImportData(class FObjectInitializer const &)" (??0UAbcAssetImportData@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "void __cdecl InternalConstructor<class UAbcAssetImportData>(class FObjectInitializer const &)" (??$InternalConstructor@VUAbcAssetImportData@@@@YAXAEBVFObjectInitializer@@@Z) cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AbcAssetImportData.gen.cpp.obj  1   
Error   LNK2001 unresolved external symbol "public: virtual void __cdecl UAbcImportSettings::Serialize(class FArchive &)" (?Serialize@UAbcImportSettings@@UEAAXAEAVFArchive@@@Z)    cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AbcImportSettings.gen.cpp.obj   1   
Error   LNK2019 unresolved external symbol "public: __cdecl UAlembicTestCommandlet::UAlembicTestCommandlet(class FObjectInitializer const &)" (??0UAlembicTestCommandlet@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "void __cdecl InternalConstructor<class UAlembicTestCommandlet>(class FObjectInitializer const &)" (??$InternalConstructor@VUAlembicTestCommandlet@@@@YAXAEBVFObjectInitializer@@@Z)  cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicTestCommandlet.gen.cpp.obj   1   
Error   LNK2001 unresolved external symbol "public: virtual int __cdecl UAlembicTestCommandlet::Main(class FString const &)" (?Main@UAlembicTestCommandlet@@UEAAHAEBVFString@@@Z)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicTestCommandlet.gen.cpp.obj   1   
Error   LNK1120 5 unresolved externals  cpp_project ..\Unreal Projects\cpp_project\Plugins\Importers\AlembicImporter\Binaries\Win64\UnrealEditor-AlembicLibrary.dll  1   
Error   LNK2019 unresolved external symbol "public: __cdecl UAlembicImportFactory::UAlembicImportFactory(class FObjectInitializer const &)" (??0UAlembicImportFactory@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function "void __cdecl InternalConstructor<class UAlembicImportFactory>(class FObjectInitializer const &)" (??$InternalConstructor@VUAlembicImportFactory@@@@YAXAEBVFObjectInitializer@@@Z)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual void __cdecl UAlembicImportFactory::PostInitProperties(void)" (?PostInitProperties@UAlembicImportFactory@@UEAAXXZ)  cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual class FText __cdecl UAlembicImportFactory::GetDisplayName(void)const " (?GetDisplayName@UAlembicImportFactory@@UEBA?AVFText@@XZ)    cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual bool __cdecl UAlembicImportFactory::DoesSupportClass(class UClass *)" (?DoesSupportClass@UAlembicImportFactory@@UEAA_NPEAVUClass@@@Z)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual class UClass * __cdecl UAlembicImportFactory::ResolveSupportedClass(void)" (?ResolveSupportedClass@UAlembicImportFactory@@UEAAPEAVUClass@@XZ)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual bool __cdecl UAlembicImportFactory::FactoryCanImport(class FString const &)" (?FactoryCanImport@UAlembicImportFactory@@UEAA_NAEBVFString@@@Z)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual class UObject * __cdecl UAlembicImportFactory::FactoryCreateFile(class UClass *,class UObject *,class FName,enum EObjectFlags,class FString const &,wchar_t const *,class FFeedbackContext *,bool &)" (?FactoryCreateFile@UAlembicImportFactory@@UEAAPEAVUObject@@PEAVUClass@@PEAV2@VFName@@W4EObjectFlags@@AEBVFString@@PEB_WPEAVFFeedbackContext@@AEA_N@Z)    cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual bool __cdecl UAlembicImportFactory::CanReimport(class UObject *,class TArray<class FString,class TSizedDefaultAllocator<32> > &)" (?CanReimport@UAlembicImportFactory@@UEAA_NPEAVUObject@@AEAV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z) cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual void __cdecl UAlembicImportFactory::SetReimportPaths(class UObject *,class TArray<class FString,class TSizedDefaultAllocator<32> > const &)" (?SetReimportPaths@UAlembicImportFactory@@UEAAXPEAVUObject@@AEBV?$TArray@VFString@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)  cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual enum EReimportResult::Type __cdecl UAlembicImportFactory::Reimport(class UObject *)" (?Reimport@UAlembicImportFactory@@UEAA?AW4Type@EReimportResult@@PEAVUObject@@@Z)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK2001 unresolved external symbol "public: virtual int __cdecl UAlembicImportFactory::GetPriority(void)const " (?GetPriority@UAlembicImportFactory@@UEBAHXZ)   cpp_project ..\Unreal Projects\cpp_project\Intermediate\ProjectFiles\AlembicImportFactory.gen.cpp.obj    1   
Error   LNK1120 11 unresolved externals cpp_project ..\Unreal Projects\cpp_project\Plugins\Importers\AlembicImporter\Binaries\Win64\UnrealEditor-AlembicImporter.dll 1   
Error   MSB3073 The command "D:\Games\UE_5.0\Engine\Build\BatchFiles\Rebuild.bat cpp_projectEditor Win64 Development -Project="..\Unreal Projects\cpp_project\cpp_project.uproject" -WaitMutex -FromMsBuild" exited with code -1.    cpp_project C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets    50

PS Main point for starting this discussion for me is to share the way to solve the problem that some other people might meet in the future. When the error occured to me I couldn’t find any solution for this problem on the internet.