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. 

(BUG) unrealheadertool bug when including a file twice

Hello, i have a strange bug in Visual Studio. I tried to start a little mathlibary with static functions. But it didnt work out from beginning. First it told me it couldnt find the implentation (source mising or stuff(ais if u have a func-dekleration but no def)). Then after trying around, and do just little things like renaming a class/filename i got an error that the scmath.generated. couldnt get accessed or once it got included twice! i had pragma once in it!

Actually there is a even stranger error. the parent class of the class where i use a static fnction from scmath.h got this error:

fatal error C1189: #error: "USC_Actor_DecalActor.generated.h already included, missing '#pragma once' in USC_Actor_DecalActor.h" USC_Actor_DecalActor.generated.h(12):

fatal error C1189: #error: "USC_Actor_DecalActor.generated.h already included, missing '#pragma once' in USC_Actor_DecalActor.h"

when i remove the class out of my project it compiles like a charm :)(well i have to clean the projectfiles like interdimate and stuff first ...) srly no idea whats the problem causing here....


 #pragma once
 #include "CoreMinimal.h"
 #include "SCMath.generated.h"
 class USCMath : public UObject
     USCMath(const FObjectInitializer& ObjectInitializer);
     USCMath() {};
 //    static bool FVector_Angle_CalculateAngleDegreeOn_XYPlane_ToXAxis(FVector &v1, float &fReturn);
     bool CalculateAngleDegreeOn_XYPlane(FVector &v1, float &fReturn);


 #include "SCMath.h"
 #include "CoreMinimal.h"
 #include "Math/UnrealMathUtility.h"
  //bool FSMath::FVector_Angle_CalculateAngleDegreeOn_XYPlane_ToXAxis(FVector &v1,  float &fReturn)
 USCMath::USCMath(const FObjectInitializer& ObjectInitializer)
     : Super(ObjectInitializer)
  bool USCMath::CalculateAngleDegreeOn_XYPlane(FVector &v1, float &fReturn)
      FVector vXAxis = FVector(1, 0, 0);
      fReturn = (acosf(FVector::DotProduct(v1, vXAxis)));
      if (fReturn > 50 && fReturn < 120)
          fReturn = fReturn;
      return true;
      //    float fAimAtAngle = FMath::RadiansToDegrees(acosf(FVector::DotProduct(v1, v2)));
      //    fAimAtAngle = acosf(FVector::DotProduct(v1, v1)); // == PI
Product Version: UE 4.18
more ▼

asked Jan 06 '18 at 01:36 AM in C++ Programming

avatar image

62 4 4 7

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

1 answer: sort voted first

I got it solved out. I have some juntionfolders in my source folder, so can use cpp easly on different projects. But from the projectcreation when i was totally new to ue4 i still had included the same files via game.build.cs:


The Problem was that i didnt realize it and that the error showed on weired situations(after i added a new class, an error showed in another class and when i removed it the error was gone).

I wont change the status of the thread, because the staff may want to take a look into it. Because i think it is still a bug. Which might could easly solved by better error handling/output or just by warning the user that the generated.h got included from 2 files. (#pragma once and include_guards didnt work, which they mabe should ?)

more ▼

answered Jan 07 '18 at 03:42 PM

avatar image

62 4 4 7

avatar image TrekDude Dec 15 '18 at 06:11 PM

Hi, I'm hitting this error now trying to bring in a plugin that was built on an older engine version. The plugin was built and runs fine in 4.18.3, but when I copy it over to a project built for 4.21, it fails with this error.

Can you please give more detail as to how you debugged this? The log result doesn't give much information other than this error, and I'm fairly new to unreal build process.

Thank you.

(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