Package Plugin (Binary + Header) - Missing precompiled manifest

Hello,
i’m trying to package a plugin with the binaries and C++ header files only. I’m using the following settings:


MyPlugin.Build.cs:


The error I receive:

UATHelper: Packaging (Windows (64-bit)): ERROR: Missing precompiled manifest for 'MyPlugin'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in MyPlugin.build.cs to override.


I expect the error to go away but it is still there after adding the line “Precompile for targets…”

The solution I’m using is the following:

  • Compile the plugin using the command line:

“ENGINE_DIR\UE_4.22\Engine\Build\BatchFiles\RunUAT.bat” BuildPlugin -Plugin=“PATH_TO_MY_PLUGIN\MyPlugin.uplugin” -Package=“PATH_TO_BUILD_FOLDER” -TargetPlatforms=Win64 -Rocket -precompile

  • Obviously replace ENGINE_DIR, PATH_TO_MY_PLUGIN, MyPlugin, PATH_TO_BUILD_FOLDER

  • Note that you should either add -precompile to the argument (as above) or put bPrecompile=true into your build.cs files

  • After building the plugin is done add/replace bPrecompile=true with bUsePrecompiled = true

  • Delete all the .cpp files (in the source and intermediate folders) (Untested: you can even delete the header files but then you can’t extend the cpp classes anymore)

  • Your plugin is now ready to use without the source code

1 Like

it works,thank you very much

Glad I could help!

sorry i know this is a bit dated,
but could you explain a little more what the PATH_TO_BUILD_FOLDER is?

Sure, it’s just the path to an empty directory where you want your built plugin (i.e. the generated dlls and other resources) to be.

There are still .obj files generated in the intermediate folder, means each of my algorithm c files is exposed with a .obj file. That’s terrible.