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. 

Error C2027: use of undefined type that doesn't exist

Hey all, I'm brand new to C++ development, though I have C# knowledge from work and some Unity hobbyism.

I'm starting to get incredibly frustrated with UE4, though. I'm trying to add a projectile to the Third Person template by picking pieces from the first person one. However, when I tried to add the projectile to my game, it wouldn't compile - I've since deleted the files and removed all references to it, but I'm still getting this error! Visual Studio has been compiling just fine the entire time, but when I try to compile within the UE4 editor, it fails for thsi same reason every time. What the heck is going on?

 Error C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2517)  : error C2027: use of undefined type 'ADodgeballProjectile'
 Info          c:\users\000\documents\unreal projects\dodgeballcpp\source\dodgeballcpp\DodgeballCPPCharacter.h(35)  : see declaration of 'ADodgeballProjectile'
 Info          C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2516)  : while compiling class template member function 'UClass *TSubclassOf<ADodgeballProjectile>::operator *(void) const'
 Info          C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectBase.h(1476)  : see reference to function template instantiation 'UClass *TSubclassOf<ADodgeballProjectile>::operator *(void) const' being compiled
 Info          c:\users\000\documents\unreal projects\dodgeballcpp\source\dodgeballcpp\DodgeballCPPCharacter.h(35)  : see reference to class template instantiation 'TSubclassOf<ADodgeballProjectile>' being compiled
 Error C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2517)  : error C3861: 'StaticClass': identifier not found

Product Version: Not Selected
more ▼

asked Mar 28 '15 at 05:44 AM in C++ Programming

avatar image

6 1 2 1

avatar image Steve Robb STAFF Mar 29 '15 at 08:31 AM


The source of the error is here:


What's on that line?


avatar image falkflyer Mar 29 '15 at 03:39 PM

This is why it's so confusing for me: that line is a comment.

 35. /** Sound to play each time we fire */
 36. UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Gameplay)
 37. class USoundBase* FireSound;
avatar image Steve Robb STAFF Mar 30 '15 at 10:05 AM

That doesn't seem possible. That error comes from the compiler (rather than the UE4 build system) and so the file is being read directly from disk. Are you sure you are looking at the right copy of the file? You don't have a copy or anything?

c:\users\000\documents\unreal projects\dodgeballcpp\source\dodgeballcpp\DodgeballCPPCharacter.h


avatar image falkflyer Mar 30 '15 at 04:13 PM

Thanks for looking at it Steve, I ended up just copying everything manually into a new project and it seems fine. I don't know if it was a caching issue or what, but it's working now.

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

0 answers: sort voted first
Be the first one to answer this question
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