BuildPlugin failing in 5.4

Hello,
I’ve been building a plugin in 5.3 for awhile now with minimal issues, but ever since I try to build it in 5.4 with the BuildPlugin command I’m getting a slew of new errors I don’t entirely understand. I can build a project with the plugin installed in it just fine in Unreal 5.4 as well.

Most of the errors seems to be undefined class references, which I can solve by tracking down the specific header and including it, but I don’t understand why I didn’t have to do this in 5.3, or when building the project.

Some of those errors include:
'UBlueprintFunctionLibrary': base class undefined
'FPaths': is not a class or namespace name

I also seem to be missing some preprocessor macros, which I’m less sure on how to fix:
'ENGINE_MAJOR_VERSION' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

I can probably just get through most of these errors by just finding the correct header files, but is there a better way to do this? Am I doing something wrong here? It’s just confusing to me since it works in older versions and when building the project.

Here’s the command I’m running:
"C:\Program Files\Epic Games\UE_5.4\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin="E:\Unreal Projects\MUD\Plugins\ClipmapUnrealTerrain\ClipmapUnrealTerrain.uplugin" -Package="D:\plugs\CUT" -TargetPlatforms=Win64 -Rocket -precompile

for UBlueprintFunctionLibrary you need to include

#include "Kismet/BlueprintFunctionLibrary.h"

Fpaths requires

#include "Misc/Paths.h"

There is no easy way. To through the documentation and look for the missing header files.

1 Like

There is no easy way. To through the documentation and look for the missing header files.

Yeah that’s what I’ve been finding out lol.

I’m just curious why it’s suddenly requiring me to do this with the new engine update. I guess something got changed somewhere.

It might me a switch to using precompiled headers. You need to include every missing header by hand but it compiles faster.

ENGINE_MAJOR_VERSION seems to be in Version.h

#include "Runtime/Launch/Resources/Version.h"
1 Like

Cool, thanks for finding those for me!

I got a ton more to dig through but I can probably find them, guess I know what I’m doing the rest of the day haha.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.