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"

Unresolved Externals when extending ATriggerBox

When I make a class inheriting ATriggerBox, without adding any extra code I am getting unresolved external errors:

 Error    1    error LNK2001: unresolved external symbol "public: virtual void __cdecl ATriggerBox::EditorApplyScale(class FVector const &,class FVector const *,bool,bool,bool)" (?EditorApplyScale@ATriggerBox@@UEAAXAEBVFVector@@PEBV2@_N22@Z)    C:\Users\Zach\Desktop\game\Intermediate\ProjectFiles\ConveyorBelt.cpp.obj
 Error    2    error LNK2019: unresolved external symbol "public: virtual void __cdecl ATriggerBox::EditorApplyScale(class FVector const &,class FVector const *,bool,bool,bool)" (?EditorApplyScale@ATriggerBox@@UEAAXAEBVFVector@@PEBV2@_N22@Z) referenced in function "class UFunction * __cdecl Z_Construct_UFunction_AScoreKeeper_GetScore(void)" (?Z_Construct_UFunction_AScoreKeeper_GetScore@@YAPEAVUFunction@@XZ)    C:\Users\Zach\Desktop\game\Intermediate\ProjectFiles\game.generated.cpp.obj
 Error    3    error LNK1120: 1 unresolved externals    C:\Users\Zach\Desktop\game\Binaries\Win64\UE4Editor-game.dll
Product Version: Not Selected
more ▼

asked Sep 12 '14 at 02:22 AM in Bug Reports

avatar image

32 6 7 11

avatar image Doug E ♦♦ STAFF Sep 15 '14 at 08:27 PM

Hey explosivo-

If we could get a little more information from you it will help in investigating this issue. Which version of the engine are you running? How do you create the new class (are you using the "Add Code to Project" button in the editor)? Is this only happening when extending ATriggerBox or does it happen with other classes? Do you get the same error in a new project?

avatar image amcofi Apr 30 '15 at 03:22 PM

Hey Doug,

I have the same issue with version 4.7.6-2513093+++depot+UE4-Releases+4.7, using VS2013 Express on Windows 8.1. I added the code using "Add Code to Project..." in a, fresh, blank C++ project. I noticed the ATriggerBox class is marked as MinimalAPI, could this be related to "a bug open internally to check and fix deriving from some of our component class types"?

I do not built the Engine myself, so I cannot easily try if removing MinimalAPI fixes the issue.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hey amcofi-

I can't say for certain if it is related to the issue you linked to however I have also created a bug report for classes derived from Trigger Base and its subclasses failing to create.


Doug Wilson

more ▼

answered Apr 30 '15 at 04:00 PM

avatar image JamesG STAFF May 01 '15 at 09:13 AM

I went ahead and added the missing ENGINE_API's to those functions, sorry for the trouble and thanks for the report!

avatar image Varicide Jul 26 '15 at 07:43 AM

I'm having the same problem. Whenever I try to make a C++ class based off "None", it works. But when I try to make a class based off Point Light I get a bunch of unresolved external symbol errors. The first one is

Error 1 error LNK2001: unresolved external symbol "public: virtual void __cdecl APointLight::EditorApplyScale(struct FVector const &,struct FVector const *,bool,bool,bool)" (?EditorApplyScale@APointLight@@UEAAXAEBUFVector@@PEBU2@_N22@Z) C:\Users\Varicide\Documents\Unreal Projects\P7\Intermediate\ProjectFiles\MyLight.cpp.obj P7

How do I fix it? I don't know how to add ENGINE_API to a function...

avatar image Doug E ♦♦ STAFF Jul 27 '15 at 04:28 PM

Hey Varicide-

If you are using a source built version of the engine you should be able to open the PointLight.h engine file and add "ENGINE_API" to the line class (ENGINE_API) APointLight : public ALight

(comments are locked)
10|2000 characters needed characters left

Hi explosivo, you got this error because ATriggerBox::EditorApplyScale isn't exported from the engine but you can override this function and copy to her body code from ATriggerBox::EditorApplyScale :p

more ▼

answered Sep 15 '14 at 08:41 PM

avatar image

2.6k 73 49 131

(comments are locked)
10|2000 characters needed characters left
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