Prebuilt Plugin distribution


I have a hard time trying to make a viable prebuilt (sources striped) package of my Plugin.

The builds kinda works fine for the Editor, as they are dlls, there is no compilation required for the “end-user”. (the usf files still needs to be copied manually, but that’s fine for now).

But I cannot get the MyPlugin-Static.lib to be linked with UE4Game.exe “Development” build once the Sources as been removed from the plugin folder. I get:

1>EXEC : error : Couldn’t find referenced module ‘MyPlugin’.

I tried several commutations of builds between a github clone, official install, plugin in Engine plugin sources, plugin in uproject plugin sources… but in vain.

Is it even possible to distribute a prebuilt plugin with striped sources ?

I’m having a similar issue, using the audio visualization plugin. You can see the progress I’ve made tracking down a solution here.. Please let me know if you find any info, I’m sure it will be useful.

I don’t think this is the same issue.

I’m talking about a C++ Plugin stripped of sources.

The doc says it should work:

But it does not seems to work at all !
I have my “Binaries/Win64/MyPlugin-Static.lib”, but neither BP uproject nor C++ uproject wants to link my plugin without sources. I always get “Couldn’t find referenced module ‘MyPlugin’” one way or another.

Does anyone have/had this issue ?

Solved !

Thanks to help from the Epic dev team (Thank you !), I leave the .build.cs files while removing all cpp/h files, and it worked !

hey Jo_PkFX,

Thanks for valuable info.

What I want to do is, create a plugin (without source code), which can be used in other unreal projects. But is I follow the way you mentioned in you comment above about removing the cpp/h files and try to build the game project it gave me compilation errors while looking for source files. Can you please explain a little how to do this, if possible.

Apologies if asking something obvious or stupid as I am new to Unreal and C++.

Thanks loads

@damanDLI, we stopped distributing our plugin without Sources, we now distribute with the source code.

But the last I remember, we got it working by building once to have the “Binaries/Win64/.lib" and ".dll” files, then removed the source files (“Private”/“Public”/“Classes” directories) except keeping the “*.build.cs” files. But it was some time ago now, I don’t know if it’s still work.

If it helps at all, I’m using 4.17.2 and can package a plugin without source. The cpp files are copied to the package output folder but if you delete the cpp files then it works. I’ve had to copy lib and dll files manually to the binaries for some build configurations.

Hi there, I am using 4.20 and I can’t do it.
I did everything as stated above, but it gives me this error:

1>UnrealBuildTool : error : UBT ERROR: Failed to produce item: C:\Users\emanuele.russo\Documents\Unreal Projects\AnotherEmptyProject\Plugins\HelloWorldPlugin\Intermediate\Build\Win64\UE4Editor\Development\HelloWorldPlugin\UE4Editor-HelloWorldPlugin.suppressed.exp
1> (see …/Programs/UnrealBuildTool/Log.txt for full exception trace)

When I include in another c++ demo project and try to rebuild.

Do you know how I might fix this?