# How to use precompiled uobject plugin?

**URL:** <https://forums.unrealengine.com/t/how-to-use-precompiled-uobject-plugin/403664>\
**Category:** Plugins\
**Tags:** c-build, unreal-engine, Plugins, CPP, question\
**Created:** [September 4, 2017, 3:26am UTC](https://forums.unrealengine.com/t/how-to-use-precompiled-uobject-plugin/403664 "2017-09-04T03:26:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_818df549](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_818df549](https://forums.unrealengine.com/u/anonymous_user_818df549)\
**Post date:** [September 4, 2017, 3:26am UTC](https://forums.unrealengine.com/t/how-to-use-precompiled-uobject-plugin/403664/1 "2017-09-04T03:26:17Z")

</div>

Hi,  
My plugin contains uobject c++ code,  
I package my plugin into a folder for distribution.

Then I create a project, delete the precompiled plugin’s cpp files, keep header files,  
copy plugin into “Plugins” folder. compile my project, I found that : the plugin was recompiled,  
and got error:  
LINK : fatal error LNK1181: cannot open input file ‘C:\Users\X\UE4\CppBPPluginLibTest\Plugins\BinaryDemoPlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BinaryDemoPlugin-1641.lib’

How can I prevent UBT recompile the precompiled plugin, and in my project,  
I just wan to use the precompiled plugin’s lib files and C++ Header files, remove the cpp files.

I found the built-in plugin: Engine\Plugins\Runtime\RuntimePhysXCooking  
It was precompiled, but doesn’t contain any uobject class.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![c4g.io](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@c4g.io](https://forums.unrealengine.com/u/c4g.io)\
**Post date:** [September 6, 2017, 4:28pm UTC](https://forums.unrealengine.com/t/how-to-use-precompiled-uobject-plugin/403664/2 "2017-09-06T16:28:20Z")

</div>

Package your plugin to a folder and delete the `Source` directory.

 ![212495-export-plugin.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/3/783704db6952acc29f23cf5012380b1fa4eea50a.jpeg)

PS:

1. `UE4Editor-BinaryDemoPlugin-1641.lib` is an incorrect file. It should be `UE4Editor-BinaryDemoPlugin.lib` and without number at end.
2. `RuntimePhysXCooking` is no `UObject` class, and it’s dll/lib/a/so files also haven’t any `UObject` class’s implements.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_818df549](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_818df549](https://forums.unrealengine.com/u/anonymous_user_818df549)\
**Post date:** [June 1, 2018, 2:00pm UTC](https://forums.unrealengine.com/t/how-to-use-precompiled-uobject-plugin/403664/3 "2018-06-01T14:00:23Z")

</div>

It worked!  
But we should keep the header files and delete cpp files.  
Sorry too late to review this issue, thank you very much!
