Description

Adding a code class that derives from SceneCaptureComponent2D will cause the build to fail in Visual Studio.

Build Errors:

1>MySceneCaptureComponent2D.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent::PostLoad(void)" (?PostLoad@USceneCaptureComponent@@UEAAXXZ)
1>TestSceneCapComp1.generated.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent::PostLoad(void)" (?PostLoad@USceneCaptureComponent@@UEAAXXZ) referenced in function "void __cdecl GetPrivateStaticClassBody<class ATestSceneCapComp1HUD>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VATestSceneCapComp1HUD@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
1>MySceneCaptureComponent2D.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::SendRenderTransform_Concurrent(void)" (?SendRenderTransform_Concurrent@USceneCaptureComponent2D@@UEAAXXZ)
1>TestSceneCapComp1.generated.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::SendRenderTransform_Concurrent(void)" (?SendRenderTransform_Concurrent@USceneCaptureComponent2D@@UEAAXXZ) referenced in function "void __cdecl GetPrivateStaticClassBody<class ATestSceneCapComp1HUD>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VATestSceneCapComp1HUD@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
1>MySceneCaptureComponent2D.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@USceneCaptureComponent2D@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
1>TestSceneCapComp1.generated.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@USceneCaptureComponent2D@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z) referenced in function "void __cdecl GetPrivateStaticClassBody<class ATestSceneCapComp1HUD>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VATestSceneCapComp1HUD@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
1>MySceneCaptureComponent2D.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@USceneCaptureComponent2D@@UEAAXAEAUFPropertyChangedEvent@@@Z)
1>TestSceneCapComp1.generated.cpp.obj : error LNK2019: unresolved external symbol "public: virtual void __cdecl USceneCaptureComponent2D::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@USceneCaptureComponent2D@@UEAAXAEAUFPropertyChangedEvent@@@Z) referenced in function "void __cdecl GetPrivateStaticClassBody<class ATestSceneCapComp1Projectile>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VATestSceneCapComp1Projectile@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
1>TestSceneCapComp1.generated.cpp.obj : error LNK2019: unresolved external symbol "public: static void __cdecl USceneCaptureComponent::AddReferencedObjects(class UObject *,class FReferenceCollector &)" (?AddReferencedObjects@USceneCaptureComponent@@SAXPEAVUObject@@AEAVFReferenceCollector@@@Z) referenced in function "void __cdecl GetPrivateStaticClassBody<class UMySceneCaptureComponent2D>(wchar_t const *,wchar_t const *,class UClass * &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VUMySceneCaptureComponent2D@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)
1>C:\Users\Tim.Lincoln\Documents\Unreal Projects\TestSceneCapComp1\Binaries\Win64\UE4Editor-TestSceneCapComp1.dll : fatal error LNK1120: 5 unresolved externals
Steps to Reproduce
  1. Create a new project using the Code First Person template, no starter content.
  2. Build the project in Visual Studio.
  3. Open the project in the Editor.
  4. Add a new code class to the project derived from SceneCaptureComponent2D.
  5. Build the project in Visual Studio.

RESULT:
The build will fail with numerous unresolved external symbol errors.

EXPECTED:
The build completes successfully.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.64.74.13
Target Fix4.14
Fix Commit3130236
Main Commit3186011
CreatedDec 9, 2014
ResolvedNov 1, 2016
UpdatedApr 27, 2018
View Jira Issue