Errors after building from source

Hello everyone, few days ago I tried to start using UE4 again, I stopped because it was really slow with visual studio intellisense, and I couldn’t afford visual assist. Now I found somewhere that building from source code (and adding /Yu to intellisense definitions) makes it run faster, and I thought I would give it a shot.

I downloaded source from GitHub, built the engine, created my own project and started following one of the beginners guide (about Timers…), however, now I get some errors that weren’t showing before. My problem is that it says UTextRenderComponent is undefined. I found somewhere that I need to include “Engine.h” but that gives me some errors about automation script…

Sorry for a beginner question but I can’t find any other way to fix this.

Thank you in advance

Hello Dino478,

Can you give examples of what you’re trying to do when you get these errors? Where are you trying to include Engine.h? What errors are you getting when you do include it?

Hello,

I made a simple Actor derived class named Countdown. In countdown.h i added int32 timer and tried to add UTextRenderComponent, it turned and said UTextRenderComponent is undefined. I have read somewhere that I should include “Engine.h”, and I have added it to Countdown.h, then,it finds the UTextRenderComponent but I get compile time errors… I can’t put exact errors because somehow it wants to compile whole engine again, and that takes more than a hour on my computer

When you say that “it turned and said UTextRenderComponent is undefined” do you mean that Intellisense is telling you this and not an actual error message? Intellisense doesn’t do the best job with our engine and has quite a few false-positives when trying to look for classes.

Also, if you do need to include Engine.h, it would likely be best to include it inside of the .h that matches the name of your project. There may be an include for Engine_Minimal already there. If so, replace it with just Engine.h.

When building a project with a source version of the editor, ensure that you’re telling the compiler to only build the project. You can do so by either right-clicking the project module and selecting Build or by selecting Build > Project Only > Build only project name from the toolbar. In this case, it should only build your project unless something has been edited in the editor’s source code that requires building, as the editor one of the project’s dependencies at this point.

Yeah, I know intellisense is not very reliable, that’s what I thought so I compiled in editor, but there was still errors when I built.

Anyway, changing the “EngineMinimal.h” to “Engine.h” helped me, looking at include file it seems only Engine.h includes TextRenderComponent. Everything works fine now, thank you a lot :slight_smile: