Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

linker error creating my own SceneCaptureComponents2D class

Hi i am trying to make my own class deriving from SceneCaptureComponent2D using: #include "Components/SceneCaptureComponent2D.h" and then i have: #include "CaptureComponent2D.generated.h"

UCLASS() class UCaptureComponent2D : public USceneCaptureComponent2D { GENERATED_UCLASS_BODY()


I feel like i am missing a step that is not obvious. i am trying to use this in creating a mini-map and feel a little lost. the way i understand it a basic class creation like this should work as i have it working for a SceneCapture2D class with no problems.

P.S my error reads: Error 1 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(wchar_t const ,wchar_t const ,class UClass &,void (__cdecl*)(void))" (??$GetPrivateStaticClassBody@VUCaptureComponent2D@@@@YAXPEB_W0AEAPEAVUClass@@P6AXXZ@Z)

Product Version: UE 4.7
more ▼

asked May 31 '15 at 02:22 AM in C++ Programming

avatar image

1 1 3

avatar image mrdid456 Jun 02 '15 at 10:26 AM

this error has admittedly morphed into something else and am now getting linker errors about not being able to find functions from the inherited class USceneCaptureComponent2D despite that i explicitly show the class where to find it. i have no problems inheriting from other classes just this one seems to give me trouble...any help would be appreciated.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello, mrdid456

I am sorry to hear about your issue.

To fix it please add ENGINE_API macro before declarations of following methods:

1) PostLoad(), AddReferencedObjects() in SceneCaptureComponent.h;

2) SendRenderTransform_Concurrent(), RequiresGameThreadEndOfFrameUpdates(), TickComponent(), PostEditChangeProperty(), UpdateContent() and UpdateDeferredCaptures() in SceneCaptureComponent2D.h.

Hope this helped!

Good luck!

more ▼

answered Jun 09 '15 at 04:39 PM

avatar image

Andrii Melnyk
1.8k 60 19 112

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi Andrii,

I'm using UE version 4.13.2 and I'm experiencing the same problem as mrdid456. Seems to me that these macro should be added to the engine so that users like myself do not need to create modifications to the engine that need to be merged everytime we upgrade UE. I see that UE 4.17 was just released. Can you tell me if these changes have been applied to any engine version after 4.13.2?

Regards, -Greg

more ▼

answered Aug 31 '17 at 03:35 PM

avatar image

Greg G
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question